Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jubeat Prop: TypeError: object of type 'NoneType' has no len() #90

Open
ivan3612 opened this issue Sep 16, 2024 · 5 comments
Open

Jubeat Prop: TypeError: object of type 'NoneType' has no len() #90

ivan3612 opened this issue Sep 16, 2024 · 5 comments
Assignees

Comments

@ivan3612
Copy link

ivan3612 commented Sep 16, 2024

After New Card registered, services provided such error in response of get_mdata

192.168.0.90 - - [16/Sep/2024 16:35:25] "POST /?model=L44:J:C:A:2016031700&module=gametop&method=get_mdata HTTP/1.1" 200 -
Received request:


0


31074902
<mdata_ver __type="s8">2</mdata_ver>
false



Traceback (most recent call last):
File "E:\Jubeat\bemaniutils-trunk\bemani\utils\services.py", line 65, in receive_request
resp = dispatch.handle(req)
^^^^^^^^^^^^^^^^^^^^
File "E:\Jubeat\bemaniutils-trunk\bemani\backend\dispatch.py", line 150, in handle
response = handler(request)
^^^^^^^^^^^^^^^^
File "E:\Jubeat\bemaniutils-trunk\bemani\backend\jubeat\prop.py", line 612, in handle_gametop_get_mdata_request
root = self.get_scores_by_extid(extid, mdata_ver, 3)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Jubeat\bemaniutils-trunk\bemani\backend\jubeat\base.py", line 182, in get_scores_by_extid
if len(scores) < 50:
^^^^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Screenshot 2024-09-16 165111

@DragonMinded
Copy link
Owner

Oh, interesting, I see what's going on here. I can attempt to fix this tonight but I might forget.

@ivan3612
Copy link
Author

Thank you
I should also mention that the database is newly built and without any data inside

@DragonMinded
Copy link
Owner

On further inspection, this seems like it shouldn't be a problem, because we always set the cache properly on first iteration. Is your instance perhaps not configured for memcached OR a file cache? I think in that case, flask would just do an in-memory instance and I have no idea what happens between loops.

I can still patch so it doesn't crash, but I think your setup might be a bit wonky.

@DragonMinded
Copy link
Owner

Alternatively, it could be more than 60 seconds between requests, which is the lifetime of the cache. Unlikely, but a possibility.

@DragonMinded
Copy link
Owner

Give 253dd52 a try. It should at least stop crashes, but I still suspect something is up with your setup.

@DragonMinded DragonMinded self-assigned this Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants