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

Keep loosing access to spools #404

Open
dresende opened this issue Jun 14, 2024 · 4 comments
Open

Keep loosing access to spools #404

dresende opened this issue Jun 14, 2024 · 4 comments
Labels
Bug Something isn't working

Comments

@dresende
Copy link
Contributor

dresende commented Jun 14, 2024

Describe the bug

After a clean install and defining/remote importing all my spools, after a few days when I go to see the Spools I get a 500 error.

To Reproduce

Steps to reproduce the behavior:

  1. Open Spoolman page (all stats open and are correct)
  2. Click on Spools list
  3. Loads for a while and then throws 500 error

Expected behavior

A list of spools.

Screenshots

Screenshot 2024-06-14 at 16 11 45
Screenshot 2024-06-14 at 16 11 53
a8)
Screenshot 2024-06-14 at 16 12 16

Spoolman Host (please complete the following information):

  • Installation type: Docker
  • Installed version: 1.18.1
  • OS and Distro: Synology
  • Database type: SQLite

Desktop (please complete the following information):

  • OS: MacOS latest stable
  • Browser: Chrome latest stable

Additional context

Docker log:

2024-05-29T20:08:23.672677463Z	stderr	Traceback (most recent call last):
2024-05-29T20:08:23.672520651Z	stderr	ERROR:    Exception in ASGI application
2024-05-29T20:08:23.667503453Z	stdout	INFO:     172.18.0.1:44240 - "GET /spool?allow_archived=false&limit=50&offset=0&sort=vendor.name:asc HTTP/1.1" 500 Internal Server Error
2024-05-29T20:08:22.651612898Z	stderr	ValueError: Invalid field name 'vendor.name', 'vendor' is not a valid field on 'Spool'.
2024-05-29T20:08:22.651563193Z	stderr	    raise ValueError(f"Invalid field name '{field}', '{fields[0]}' is not a valid field on '{base_obj.__name__}'.")
2024-05-29T20:08:22.651520629Z	stderr	  File "/home/app/spoolman/spoolman/database/utils.py", line 23, in parse_nested_field
2024-05-29T20:08:22.651485322Z	stderr	                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-05-29T20:08:22.651433725Z	stderr	    sorts.append(parse_nested_field(models.Spool, fieldstr))
2024-05-29T20:08:22.651388464Z	stderr	  File "/home/app/spoolman/spoolman/database/spool.py", line 191, in find
2024-05-29T20:08:22.651352899Z	stderr	                            ^^^^^^^^^^^^^^^^^
2024-05-29T20:08:22.651306696Z	stderr	    db_items, total_count = await spool.find(
2024-05-29T20:08:22.651261395Z	stderr	  File "/home/app/spoolman/spoolman/api/v1/spool.py", line 254, in find
2024-05-29T20:08:22.651227249Z	stderr	           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-05-29T20:08:22.651187168Z	stderr	    return await dependant.call(**values)
2024-05-29T20:08:22.651137477Z	stderr	  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 190, in run_endpoint_function
2024-05-29T20:08:22.651086430Z	stderr	                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-05-29T20:08:22.651048589Z	stderr	    raw_response = await run_endpoint_function(
2024-05-29T20:08:22.651004942Z	stderr	  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 273, in app
2024-05-29T20:08:22.650970159Z	stderr	               ^^^^^^^^^^^^^^^^^^^
2024-05-29T20:08:22.650931796Z	stderr	    response = await func(request)
2024-05-29T20:08:22.650886681Z	stderr	  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/starlette/routing.py", line 66, in app
2024-05-29T20:08:22.650838939Z	stderr	    await self.app(scope, receive, send)
2024-05-29T20:08:22.650795569Z	stderr	  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle
2024-05-29T20:08:22.650757523Z	stderr	    await route.handle(scope, receive, send)
2024-05-29T20:08:22.650715120Z	stderr	  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/starlette/routing.py", line 718, in __call__
2024-05-29T20:08:22.650677405Z	stderr	    await self.app(scope, receive, send)
2024-05-29T20:08:22.650632192Z	stderr	  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
2024-05-29T20:08:22.650596981Z	stderr	    raise e
2024-05-29T20:08:22.650553522Z	stderr	  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
2024-05-29T20:08:22.650515806Z	stderr	    await self.app(scope, receive, sender)
2024-05-29T20:08:22.650471862Z	stderr	  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
2024-05-29T20:08:22.650432762Z	stderr	    raise exc
2024-05-29T20:08:22.650386756Z	stderr	  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
2024-05-29T20:08:22.650349272Z	stderr	    await self.app(scope, receive, _send)
2024-05-29T20:08:22.650304095Z	stderr	  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 162, in __call__
2024-05-29T20:08:22.650268415Z	stderr	    raise exc
2024-05-29T20:08:22.650224714Z	stderr	  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 184, in __call__
2024-05-29T20:08:22.650186932Z	stderr	    await self.middleware_stack(scope, receive, send)
2024-05-29T20:08:22.650143939Z	stderr	  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/starlette/applications.py", line 122, in __call__
2024-05-29T20:08:22.650105650Z	stderr	    await super().__call__(scope, receive, send)
2024-05-29T20:08:22.650062406Z	stderr	  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 292, in __call__
2024-05-29T20:08:22.650024121Z	stderr	    await self.app(scope, receive, send)
2024-05-29T20:08:22.649979617Z	stderr	  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/starlette/routing.py", line 443, in handle
2024-05-29T20:08:22.649938202Z	stderr	    await route.handle(scope, receive, send)
2024-05-29T20:08:22.649891807Z	stderr	  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/starlette/routing.py", line 718, in __call__
2024-05-29T20:08:22.649831183Z	stderr	    await self.app(scope, receive, send)
2024-05-29T20:08:22.649784754Z	stderr	  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
2024-05-29T20:08:22.649747896Z	stderr	    raise e
2024-05-29T20:08:22.649701763Z	stderr	  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
2024-05-29T20:08:22.649659252Z	stderr	    await self.app(scope, receive, sender)
2024-05-29T20:08:22.649612211Z	stderr	  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
2024-05-29T20:08:22.649576549Z	stderr	    raise exc
2024-05-29T20:08:22.649531942Z	stderr	  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
2024-05-29T20:08:22.649492977Z	stderr	    await self.app(scope, receive, self.send_with_gzip)
2024-05-29T20:08:22.649446475Z	stderr	  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/starlette/middleware/gzip.py", line 44, in __call__
2024-05-29T20:08:22.649407756Z	stderr	    await responder(scope, receive, send)
2024-05-29T20:08:22.649362252Z	stderr	  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/starlette/middleware/gzip.py", line 24, in __call__
2024-05-29T20:08:22.649320788Z	stderr	    await self.app(scope, receive, _send)
2024-05-29T20:08:22.649276692Z	stderr	  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 162, in __call__
2024-05-29T20:08:22.649239235Z	stderr	    raise exc
2024-05-29T20:08:22.649193742Z	stderr	  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 184, in __call__
2024-05-29T20:08:22.649154289Z	stderr	    await self.middleware_stack(scope, receive, send)
2024-05-29T20:08:22.649108898Z	stderr	  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/starlette/applications.py", line 122, in __call__
2024-05-29T20:08:22.649058738Z	stderr	    await super().__call__(scope, receive, send)
2024-05-29T20:08:22.649012598Z	stderr	  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 292, in __call__
2024-05-29T20:08:22.648977746Z	stderr	           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-05-29T20:08:22.648935178Z	stderr	    return await self.app(scope, receive, send)
2024-05-29T20:08:22.648881511Z	stderr	  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
2024-05-29T20:08:22.648822263Z	stderr	             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-05-29T20:08:22.648776172Z	stderr	    result = await app(  # type: ignore[func-returns-value]
2024-05-29T20:08:22.648703792Z	stderr	  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 435, in run_asgi
@dresende dresende added the Bug Something isn't working label Jun 14, 2024
@dresende
Copy link
Contributor Author

FTR, I can access filaments just fine.

@Donkie
Copy link
Owner

Donkie commented Aug 5, 2024

Sorry for the late response

Not really sure how you managed to make it try to sort the spools by vendor/manufacturer. Does it fix itself if you click the Clear Filters button?

@dresende
Copy link
Contributor Author

dresende commented Aug 5, 2024

No problem :) Clicking clear fixed the issue, so it's just a matter of checking for the filter. I don't know if I sorted by vendor/manufacturer. Could it have been leaked from the Filaments view?

@AlexTheGreat1971
Copy link

AlexTheGreat1971 commented Sep 4, 2024

Have the same error but on Vendors page.
Steps to reproduce the behavior:

  • Open Spoolman page (all stats open and are correct)
  • Click on Vendors list
  • Loads for a while and then throws 500 error
    Expected behavior
    A list of Vendors.

Installation type: Standalone
Installed version: 1.19.3
OS and Distro: Debian 24.04 / OpenNept4une
Database type: SQLite

This happened after the update to 0.19.2-0.19.3
Similarly, the number of manufacturers is indicated on the main page, but when I log in, I get an error of 500. Neither sorting nor resetting filters solves the problem. I tried to replace the database file with backuped ones. Then manufacturers start to be displayed, but then spools or filaments stop being displayed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants