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
angelo
angelo•3y ago
Hey there, didn't see this, Project Id please?
MadeInShineA
MadeInShineAOP•3y ago
8011d58c-777a-4c7c-9933-2ab62236388b @Angelo 🙂
angelo
angelo•3y ago
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?
MadeInShineA
MadeInShineAOP•3y ago
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'
angelo
angelo•3y ago
Yep, sounds like you aren't including the needed packages in your requirements.txt
MadeInShineA
MadeInShineAOP•3y ago
that's weird, I thought generating it with pip freeze would do the job...
Want results from more Discord servers?
Add your server