Code Monkey home page Code Monkey logo

Comments (3)

gantoine avatar gantoine commented on September 27, 2024

What search term are you using, and for which platform?

As for the error, seems Mobygames is returning a game with no title/name. I'll add a check for that in the next release.

from romm.

mobedoor avatar mobedoor commented on September 27, 2024

For example, when searching for "Harry Potter and the Sorcerers stone" on Gameboy Color, I get

romm     |  - "GET /roms/15 HTTP/1.0" 200
romm     | INFO:	 [nginx][2024-05-03 03:38:52]	172.21.0.1 - - "GET /api/roms/15 HTTP/1.1" 200 1683 "http://localhost:8006/rom/15" "Mozilla/5.0 (X11; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0" rt=0.017 uct="0.000" uht="0.017" urt="0.017"
romm     |  - "GET /platforms/7 HTTP/1.0" 200
romm     | INFO:	 [nginx][2024-05-03 03:38:52]	172.21.0.1 - - "GET /api/platforms/7 HTTP/1.1" 200 133 "http://localhost:8006/rom/15" "Mozilla/5.0 (X11; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0" rt=0.013 uct="0.000" uht="0.013" urt="0.013"
romm     | INFO:	 [RomM][2024-05-03 03:38:56] 🔎 Searching metadata providers...
romm     | INFO:	 [RomM][2024-05-03 03:38:56] Searching by name: Harry Potter and the Sorcerer's Stone (USA, Europe) (En,Fr,De,Es,It,Nl,Pt,Sv,No,Da,Fi).zip
romm     | INFO:	 [RomM][2024-05-03 03:38:56] 🎮 gbc: Harry Potter and the Sorcerer's Stone (USA, Europe) (En,Fr,De,Es,It,Nl,Pt,Sv,No,Da,Fi).zip
romm     | INFO:	 [nginx][2024-05-03 03:38:56]	172.21.0.1 - - "GET /assets/moby.49a5e771.png HTTP/1.1" 200 24824 "http://localhost:8006/rom/15" "Mozilla/5.0 (X11; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0" rt=0.000 uct="-" uht="-" urt="-"
romm     | INFO:	 [RomM][2024-05-03 03:38:57] Results:
romm     |  - "GET /search/roms?rom_id=15&search_term=Harry+Potter+and+the+Sorcerer%27s+Stone+(USA,+Europe)+(En,Fr,De,Es,It,Nl,Pt,Sv,No,Da,Fi).zip&search_by=Name&search_extended=false HTTP/1.0" 200
romm     | INFO:	 [nginx][2024-05-03 03:38:57]	172.21.0.1 - - "GET /api/search/roms?rom_id=15&search_term=Harry+Potter+and+the+Sorcerer%27s+Stone+(USA,+Europe)+(En,Fr,De,Es,It,Nl,Pt,Sv,No,Da,Fi).zip&search_by=Name&search_extended=false HTTP/1.1" 200 2 "http://localhost:8006/rom/15" "Mozilla/5.0 (X11; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0" rt=1.482 uct="0.000" uht="1.481" urt="1.482"
romm     | INFO:	 [RomM][2024-05-03 03:38:59] 🔎 Searching metadata providers...
romm     | INFO:	 [RomM][2024-05-03 03:38:59] Searching by name: Harry Potter and the Sorcerer's Stone
romm     | INFO:	 [RomM][2024-05-03 03:38:59] 🎮 gbc: Harry Potter and the Sorcerer's Stone (USA, Europe) (En,Fr,De,Es,It,Nl,Pt,Sv,No,Da,Fi).zip
romm     | INFO:	 [RomM][2024-05-03 03:39:00] Results:
romm     |  - "GET /search/roms?rom_id=15&search_term=Harry+Potter+and+the+Sorcerer%27s+Stone&search_by=Name&search_extended=false HTTP/1.0" 200
romm     | INFO:	 [nginx][2024-05-03 03:39:00]	172.21.0.1 - - "GET /api/search/roms?rom_id=15&search_term=Harry+Potter+and+the+Sorcerer%27s+Stone&search_by=Name&search_extended=false HTTP/1.1" 200 2 "http://localhost:8006/rom/15" "Mozilla/5.0 (X11; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0" rt=1.182 uct="0.000" uht="1.182" urt="1.18

Upon searching by id (5416), I get

romm     | [2024-05-03 03:40:32 +0000] [46] [ERROR] Exception in ASGI application
romm     | Traceback (most recent call last):
romm     |   File "/backend/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 407, in run_asgi
romm     |     result = await app(  # type: ignore[func-returns-value]
romm     |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
romm     |   File "/backend/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 69, in __call__
romm     |     return await self.app(scope, receive, send)
romm     |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
romm     |   File "/backend/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
romm     |     await super().__call__(scope, receive, send)
romm     |   File "/backend/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
romm     |     await self.middleware_stack(scope, receive, send)
romm     |   File "/backend/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
romm     |     raise exc
romm     |   File "/backend/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
romm     |     await self.app(scope, receive, _send)
romm     |   File "/backend/handler/auth_handler/middleware.py", line 136, in __call__
romm     |     await self.app(scope, receive, send_wrapper)
romm     |   File "/backend/lib/python3.11/site-packages/starlette/middleware/authentication.py", line 48, in __call__
romm     |     await self.app(scope, receive, send)
romm     |   File "/backend/handler/auth_handler/middleware.py", line 17, in __call__
romm     |     await super().__call__(scope, receive, send)
romm     |   File "/backend/lib/python3.11/site-packages/starlette_csrf/middleware.py", line 72, in __call__
romm     |     await self.app(scope, receive, send)
romm     |   File "/backend/lib/python3.11/site-packages/starlette/middleware/cors.py", line 83, in __call__
romm     |     await self.app(scope, receive, send)
romm     |   File "/backend/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
romm     |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
romm     |   File "/backend/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
romm     |     raise exc
romm     |   File "/backend/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
romm     |     await app(scope, receive, sender)
romm     |   File "/backend/lib/python3.11/site-packages/starlette/routing.py", line 758, in __call__
romm     |     await self.middleware_stack(scope, receive, send)
romm     |   File "/backend/lib/python3.11/site-packages/starlette/routing.py", line 778, in app
romm     |     await route.handle(scope, receive, send)
romm     |   File "/backend/lib/python3.11/site-packages/starlette/routing.py", line 299, in handle
romm     |     await self.app(scope, receive, send)
romm     |   File "/backend/lib/python3.11/site-packages/starlette/routing.py", line 79, in app
romm     |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
romm     |   File "/backend/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
romm     |     raise exc
romm     |   File "/backend/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
romm     |     await app(scope, receive, sender)
romm     |   File "/backend/lib/python3.11/site-packages/starlette/routing.py", line 74, in app
romm     |     response = await func(request)
romm     |                ^^^^^^^^^^^^^^^^^^^
romm     |   File "/backend/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app
romm     |     raw_response = await run_endpoint_function(
romm     |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
romm     |   File "/backend/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
romm     |     return await dependant.call(**values)
romm     |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
romm     |   File "/backend/lib/python3.11/site-packages/starlette/authentication.py", line 84, in async_wrapper
romm     |     return await func(*args, **kwargs)
romm     |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
romm     |   File "/backend/endpoints/search.py", line 81, in search_rom
romm     |     merged_dict[item["name"]] = {
romm     |                 ~~~~^^^^^^^^
romm     | KeyError: 'name'

from romm.

gantoine avatar gantoine commented on September 27, 2024

Harry Potter and the Sorcerers stone

that's likely because Sorcerer's has an apostrophe in it, and the mobygames API doesn't deal well (read: at all) with special characters)

Upon searching by id (5416), I get

this'll be fixed in the next release

from romm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.