You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used the GitHub search to find a similar question and didn't find it.
I searched in the documentation/README.
I already searched in Google "How to do X" and didn't find any information.
I already read and followed all the tutorial in the docs/README and didn't find an answer.
Commit to Help
I commit to help with one of those options 👆
Example Code
N/A
Description
This is a little involved... bear with me ;).
To avoid module naming collisions, I'm using a toplevel namespaced package majqa, of which "webapp" containing app.py is a submodule, as is a submodule named 'github'...
... I'm accessing my majqa.github module, instead of PyGithub's github module.
I'm using workarounds to solve the problem, but am wondering is it reasonable to ask... If fastapi-cli feels the need to unconventionally manipulate sys.path to startup, can it restore it once it's done using it?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
First Check
Commit to Help
Example Code
Description
This is a little involved... bear with me ;).
To avoid module naming collisions, I'm using a toplevel namespaced package
majqa
, of which "webapp" containing app.py is a submodule, as is a submodule named 'github'...When invoking fastapi run .../majqa/webapp to start the service, sys.path get's prefixed to include the majqa namespace module path, i think here...
fastapi-cli/src/fastapi_cli/discover.py
Line 125 in 9a47418
In subsequent code, I'm trying to import symbols from the PyGithub package....
However, due to the manipulated path...
... I'm accessing my majqa.github module, instead of PyGithub's github module.
I'm using workarounds to solve the problem, but am wondering is it reasonable to ask... If fastapi-cli feels the need to unconventionally manipulate sys.path to startup, can it restore it once it's done using it?
Thanks for any feedback!
Operating System
Linux
Operating System Details
Most recent Fedora
Python Version
Python 3.12.5
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions