I apologize because this is more of a python quest...
# ask-community
I apologize because this is more of a python question than a dagster question, but I am trying to break my code up into separate files, and I'm running into import issues when doing
dagit -f ....
I'm able to reproduce this in the hacker news example repo: (see thread)
Copy code
====> git rev-parse --short HEAD

====> pwd

=====> dagit -f repo.py
Using temporary directory /Users/mannyschneck/cbio/repo/external/dagster/examples/hacker_news/hacker_news/tmpvyarfsyz for storage. This will be removed when dagit exits.
To persist information across sessions, set the environment variable DAGSTER_HOME to a directory to use.

/Users/mannyschneck/cbio/repo/external/dagster/python_modules/dagster/dagster/core/workspace/context.py:538: UserWarning: Error loading repository location repo.py:dagster.core.errors.DagsterImportError: Encountered ImportError: `attempted relative import with no known parent package` while importing module repo from file /Users/mannyschneck/cbio/repo/external/dagster/examples/hacker_news/hacker_news/repo.py. Consider using the module-based options `-m` for CLI-based targets or the `python_package` workspace.yaml target.

Stack Trace:
  File "/Users/mannyschneck/cbio/repo/external/dagster/python_modules/dagster/dagster/grpc/server.py", line 205, in __init__