-
Notifications
You must be signed in to change notification settings - Fork 7
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
Fix resetting project anatomy during project update #87
Conversation
Co-authored-by: Roy Nieterau <[email protected]>
Co-authored-by: Roy Nieterau <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pairing a project fails. (it works in develop branch)
I found these in the logs in the event viewer:
Description
[POST] /addons/kitsu/1.2.4-dev.1/pairing: UNHANDLED EXCEPTION
Message
[POST] /addons/kitsu/1.2.4-dev.1/pairing: UNHANDLED EXCEPTION
Description
'NoneType' object has no attribute 'name'
Message
'NoneType' object has no attribute 'name'
Here's the sever docker log:
server-1 | 2024-10-31T09:55:01.497971369Z 2024-10-31 12:55:01 ERROR anonymous [POST] /enroll: UNHANDLED EXCEPTION
server-1 | 2024-10-31T09:55:01.497995414Z 2024-10-31 12:55:01 ERROR server 1 validation errors:
server-1 | 2024-10-31T09:55:01.497998068Z {'loc': ('response',), 'msg': 'none is not an allowed value', 'type': 'type_error.none.not_allowed'}
server-1 | 2024-10-31T09:55:01.498000101Z
server-1 | 2024-10-31T09:55:01.551128472Z [2024-10-31 12:55:01 +0300] [26] [ERROR] Exception in ASGI application
server-1 | 2024-10-31T09:55:01.551144455Z Traceback (most recent call last):
server-1 | 2024-10-31T09:55:01.551147139Z File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 426, in run_asgi
server-1 | 2024-10-31T09:55:01.551149282Z result = await app( # type: ignore[func-returns-value]
server-1 | 2024-10-31T09:55:01.551151135Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
server-1 | 2024-10-31T09:55:01.551152937Z File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
server-1 | 2024-10-31T09:55:01.551154810Z return await self.app(scope, receive, send)
server-1 | 2024-10-31T09:55:01.551156573Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
server-1 | 2024-10-31T09:55:01.551158325Z File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
server-1 | 2024-10-31T09:55:01.551160148Z await super().__call__(scope, receive, send)
server-1 | 2024-10-31T09:55:01.551161901Z File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
server-1 | 2024-10-31T09:55:01.551163693Z await self.middleware_stack(scope, receive, send)
server-1 | 2024-10-31T09:55:01.551165446Z File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
server-1 | 2024-10-31T09:55:01.551167248Z raise exc
server-1 | 2024-10-31T09:55:01.551168931Z File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
server-1 | 2024-10-31T09:55:01.551170723Z await self.app(scope, receive, _send)
server-1 | 2024-10-31T09:55:01.551172446Z File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
server-1 | 2024-10-31T09:55:01.551174279Z await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
server-1 | 2024-10-31T09:55:01.551176071Z File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
server-1 | 2024-10-31T09:55:01.551177894Z raise exc
server-1 | 2024-10-31T09:55:01.551179596Z File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
server-1 | 2024-10-31T09:55:01.551181419Z await app(scope, receive, sender)
server-1 | 2024-10-31T09:55:01.551183142Z File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 756, in __call__
server-1 | 2024-10-31T09:55:01.551184954Z await self.middleware_stack(scope, receive, send)
server-1 | 2024-10-31T09:55:01.551186687Z File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 776, in app
server-1 | 2024-10-31T09:55:01.551188479Z await route.handle(scope, receive, send)
server-1 | 2024-10-31T09:55:01.551190212Z File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle
server-1 | 2024-10-31T09:55:01.551192025Z await self.app(scope, receive, send)
server-1 | 2024-10-31T09:55:01.551193777Z File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 77, in app
server-1 | 2024-10-31T09:55:01.551203722Z await wrap_app_handling_exceptions(app, request)(scope, receive, send)
server-1 | 2024-10-31T09:55:01.551205835Z File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
server-1 | 2024-10-31T09:55:01.551207718Z raise exc
server-1 | 2024-10-31T09:55:01.551209450Z File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
server-1 | 2024-10-31T09:55:01.551211283Z await app(scope, receive, sender)
server-1 | 2024-10-31T09:55:01.551213075Z File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 72, in app
server-1 | 2024-10-31T09:55:01.551217061Z response = await func(request)
server-1 | 2024-10-31T09:55:01.551218824Z ^^^^^^^^^^^^^^^^^^^
server-1 | 2024-10-31T09:55:01.551220556Z File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 296, in app
server-1 | 2024-10-31T09:55:01.551222369Z content = await serialize_response(
server-1 | 2024-10-31T09:55:01.551224072Z ^^^^^^^^^^^^^^^^^^^^^^^^^
server-1 | 2024-10-31T09:55:01.551225794Z File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 155, in serialize_response
server-1 | 2024-10-31T09:55:01.551227597Z raise ResponseValidationError(
server-1 | 2024-10-31T09:55:01.551229329Z fastapi.exceptions.ResponseValidationError: 1 validation errors:
server-1 | 2024-10-31T09:55:01.551231102Z {'loc': ('response',), 'msg': 'none is not an allowed value', 'type': 'type_error.none.not_allowed'}
server-1 | 2024-10-31T09:55:01.551232894Z
@MustafaJafar i was not able to reproduce the problem, but I've found two spots where the issue might originate from and fixed it. Could you pls try again? |
ignore me. it is working now. maybe there was an issue in my network. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this works on my side.
Changelog
Previously, updating a project in Kitsu caused non-pairable attributes in Ayon to reset to default values. This occurred because the primary anatomy preset was being used as the base instead of the actual project anatomy.
Additional info
A new helper function
extract_ayon_project_anatomy
was introduced. Since this is a useful function, it should eventually become a part ofayon_server.helpers
but now it is included in this addon to maintain compatibility with the current (and previous) Ayon versions.Testing Instructions