Skip to content

Import from another file. ModuleNotFoundError: No module named... #5227

Answered by igonro
igonro asked this question in Q&A
Discussion options

You must be logged in to vote

Just after sending this question I found the solution to my problem.

I was executing the agent in the $HOME directory instead of the project folder. So I found two possible options:

  1. Executing the agent in the project folder.
  2. Adding the --import-path /path/to/project flag to the agent command.

Also I think it could be a good practice to create a setup.py file and install my own project, but I didn't try that yet.

Sorry for opening this discussion, I will mark it as answered; but feel free to correct me if I said something wrong.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@tchcd
Comment options

@MrChadMWood
Comment options

Answer selected by igonro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants