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 call
import. 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__.pyfile 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.