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

bug: robot server fails to start on robot with httpapiv2 because it relies on typing_extensions #5275

Closed
sfoster1 opened this issue Mar 24, 2020 · 0 comments · Fixed by #5281
Assignees
Labels
bug robot server Affects the `robot-server` project robot-svcs Falls under the purview of the Robot Services squad (formerly CPX, Core Platform Experience).

Comments

@sfoster1
Copy link
Member

Overview

#5208 imports typing_extensions at runtime, but typing_extensions is a dev dependency only for static type analysis and not present on robots. This means that the robot server crashes on start when http apiv2 is enabled.

Like in https://github.com/Opentrons/opentrons/blob/edge/api/src/opentrons/hardware_control/dev_types.py if possible typing_extensions should be imported in a failure-tolerant way and types dependent on it should be in string annotations and only checked statically.

If not possible to keep typing_extensions to only static use, we should add it to the buildroot config.

Traceback (reversed order from journalctl -r):

Mar 24 15:11:42 OT2CEP20191129B16 python[385]: ModuleNotFoundError: No module named 'typing_extensions'
Mar 24 15:11:42 OT2CEP20191129B16 python[385]:   File "usr/lib/python3.7/site-packages/robot_server/service/models/json_api/request.py", line 2, in <module>
Mar 24 15:11:42 OT2CEP20191129B16 python[385]:   File "usr/lib/python3.7/site-packages/robot_server/service/models/json_api/factory.py", line 3, in <module>
Mar 24 15:11:42 OT2CEP20191129B16 python[385]:   File "usr/lib/python3.7/site-packages/robot_server/service/routers/item.py", line 5, in <module>
Mar 24 15:11:42 OT2CEP20191129B16 python[385]:   File "usr/lib/python3.7/site-packages/robot_server/service/main.py", line 11, in <module>
Mar 24 15:11:42 OT2CEP20191129B16 python[385]:   File "usr/lib/python3.7/site-packages/robot_server/service/__init__.py", line 18, in run
Mar 24 15:11:42 OT2CEP20191129B16 python[385]:   File "usr/lib/python3.7/site-packages/robot_server/main.py", line 64, in run
Mar 24 15:11:42 OT2CEP20191129B16 python[385]:   File "usr/lib/python3.7/site-packages/robot_server/main.py", line 94, in main
Mar 24 15:11:42 OT2CEP20191129B16 python[385]:   File "usr/lib/python3.7/site-packages/robot_server/main.py", line 100, in <module>
Mar 24 15:11:42 OT2CEP20191129B16 python[385]:   File "/buildroot/output/target/usr/lib/python3.7/runpy.py", line 85, in _run_code
Mar 24 15:11:42 OT2CEP20191129B16 python[385]:   File "/buildroot/output/target/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
Mar 24 15:11:42 OT2CEP20191129B16 python[385]: Traceback (most recent call last)
@sfoster1 sfoster1 added bug robot-svcs Falls under the purview of the Robot Services squad (formerly CPX, Core Platform Experience). robot server Affects the `robot-server` project labels Mar 24, 2020
@iansolano iansolano self-assigned this Mar 24, 2020
iansolano added a commit that referenced this issue Mar 24, 2020
…nse work

fix typing_extensions bug by removing Literal type and subsequently the library

closes #5275
iansolano added a commit that referenced this issue Mar 25, 2020
…nse work (#5281)

fix typing_extensions bug by removing Literal type and subsequently the library

closes #5275
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug robot server Affects the `robot-server` project robot-svcs Falls under the purview of the Robot Services squad (formerly CPX, Core Platform Experience).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants