__pycache__ directory containing .pyc files shadows some pyscript modules causing errors and persistently returns after deletion #624
Unanswered
dorbitbrown
asked this question in
Q&A
Replies: 1 comment 2 replies
-
pyscript shouldn't create a compiled cache directory. Is there any chance some instance of regular python is executing scripts in that directory? |
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
-
Recently, some of my pyscript modules started failing with odd errors like, "NameError: name 'input_text' is not defined", and the same for "input_boolean", "log" and other magic HA or pyscript features, exactly as if the modules were in /pyscript_modules/ rather than in /pyscript/modules. Finally I noticed a pycache folder in /pyscript/modules, containing .pyc files for exactly the modules that were failing. I realized they were running plain Python, and causing the .py files to be shadowed and not run by the pyscript async interpreter. So, the solution seemed easy--delete them. BUT, a few seconds after deleting, the directory and files mysteriously and persistently reappeared again.
Is there some hidden flag or list that I can modify to stop this from happening?
Beta Was this translation helpful? Give feedback.
All reactions