Problem importing from /config/pyscript/modules #208
Unanswered
dorbitbrown
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Can you post a few lines from the top of |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My script got too large to load reliably, so I've refactored it into modules which I've saved in /config/pyscript/modules. For example:
/config/pyscript/modules/physics.py.
But now when my script in /config/pyscript/scripts runs and tries to import from one of those modules, it errors out. For example:
....ERROR (MainThread) [custom_components.pyscript.scripts.mkwd] Exception in </config/pyscript/scripts/mkwd.py> line 23:
....from physics import sun_meridian_bearing, desired_cover_position
....^
....ModuleNotFoundError: No module named 'physics'
I discovered that /config/pyscript/modules was not in sys.path, so I appended it, but that didn't change anything.
Any suggestions?
Beta Was this translation helpful? Give feedback.
All reactions