Import error when deploying
Hey, I get this error message when trying to deploy an app from a gh repo...
ImportError: cannot import name 'main' from 'ast' (/nix/store/idahnf1p9ljp4j568idrwb5zbbcmdhm1-python3-3.8.14/lib/python3.8/ast.py)
6 Replies
Hey there, didn't see this, Project Id please?
8011d58c-777a-4c7c-9933-2ab62236388b @Angelo 🙂
I am not a Python guy but I feel like you don't need to import
ast
since it's in the standard lib
https://docs.python.org/3/library/ast.html
What happens if you remove that import, does it yell at you?oh... and I realised I didn't even use it I think lol, I'm going to try changing that !
okay, i'm getting another error now
File "/app/map/models.py", line 4, in <module>
from tkinter import CASCADE
File "/nix/store/idahnf1p9ljp4j568idrwb5zbbcmdhm1-python3-3.8.14/lib/python3.8/tkinter/init.py", line 36, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ModuleNotFoundError: No module named '_tkinter'
Yep, sounds like you aren't including the needed packages in your
requirements.txt
that's weird, I thought generating it with pip freeze would do the job...