daily pastebin goal
21%
SHARE
TWEET

Untitled

a guest Jan 22nd, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ImportError while loading conftest '/.../test/conftest.py'.
  2. test/conftest.py:3: in <module>
  3.     from flask_app import create_api
  4. src/flask_app/__init__.py:4: in <module>
  5.     api = create_api(app)
  6. src/flask_app/app.py:22: in create_api
  7.     from . data.views import master_data
  8. src/flask_app/data/views.py:3: in <module>
  9.     from common.my_module import my_func
  10. src/common/my_module/__init__.py:1: in <module>
  11.     from common.my_module.bar_module import my_func  # NOQA
  12. src/common/my_module/bar_module.py:5: in <module>
  13.     import common.my_module.errors as err
  14. E   AttributeError: module 'common' has no attribute 'my_module'
  15.    
  16. src/
  17.         common/
  18.                    my_module/
  19.                                  __init__.py
  20.                                  errors.py                                    
  21.                                  bar_module.py
  22.                    foo_module.py
  23. test/
  24.         unittests/
  25.                    __init__.py
  26.                    test_bar_module.py
  27.         conftest.py
  28.         pytest.ini
  29.    
  30. >>> import common
  31. >>> help(common)
  32. Help on package common:
  33.  
  34. NAME
  35.     common
  36.  
  37. PACKAGE CONTENTS
  38.     my_module (package)
  39.     foo_module
  40.  
  41. FILE
  42.     /.../src/common/__init__.py
  43.    
  44. >>> import sys
  45. >>> sys.path
  46. ['', '/.../src', '/.../test', '/usr/local/lib/python36.zip', '/usr/local/lib/python3.6', '/usr/local/lib/python3.6/lib-dynload', '/usr/local/lib/python3.6/site-packages']
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top