Python unittest cannot perform relative import

Describes the cause and action for error messages.


Error Message(English):
unittest cannot perform relative import

Resolution


関連リンク


Relative imports in Python 3 - Stack Overflow
https://stackoverflow.com/questions/16981921/relative-imports-in-python-3

SystemError: Parent module '' not loaded, cannot perform ...
https://stackoverflow.com/questions/33837717/systemerror-parent-module-not-loaded-cannot-perform-rel・・・

Relative import in Python 3 not working
https://stackoverflow.com/questions/16637428/relative-import-in-python-3-not-working

Relative imports with unittest in Python
https://stackoverflow.com/questions/21490860/relative-imports-with-unittest-in-python

Python3 Relative Imports inside a package
https://stackoverflow.com/questions/34523514/python3-relative-imports-inside-a-package

Parent module '' not loaded, cannot perform relative import ・ Issue #11 ...
https://github.com/kennethreitz/samplemod/issues/11

SystemError: Parent module '' not loaded, cannot perform relative import
https://github.com/SublimeText/UnitTesting/issues/67

SystemError: Parent module '' not loaded, cannot perform relative import
https://github.com/mitmproxy/pdoc/issues/94

ImportError: attempted relative import with no known parent package
https://napuzba.com/a/import-error-relative-no-parent/

What is the core reason for this error 'Attempted relative import ...
https://www.quora.com/What-is-the-core-reason-for-this-error-Attempted-relative-import-in-non-packag・・・



Name:
Comment:



[return to Python エラーコード一覧]