Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Attempted relative import in non-package
-
I get this error when I call
import gittle
(after installing both gittle and dulwich), which, from what I understand, should only exist if running the script directly, not if I callimport
. What's up win this? Does pythonista not change__name__
, or am I confused? How can I fix this? -
Are you running this in the interactive interpreter, or is there other code that runs before the import? Also where did you install gittle, and does it have a
__init__.py
file in the package folder? -
I installed it from GitHub, just running the import statement. I fixed the problem by renaming some files and removing some relative imports.