Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__init__.py needs to have imports for the different sub-modules #9

Open
wolfy1339 opened this issue Sep 12, 2017 · 1 comment
Open

Comments

@wolfy1339
Copy link

Traceback (most recent call last):
  File "manage.py", line 1, in <module>
    from quantifiedcode.settings import settings
  File "/root/quantifiedcode/quantifiedcode/settings/__init__.py", line 1, in <module>
    from .base import * #noqa
  File "/root/quantifiedcode/quantifiedcode/settings/base.py", line 12, in <module>
    from quantifiedcode.helpers.settings import Settings, load_settings
  File "/root/quantifiedcode/quantifiedcode/helpers/settings.py", line 13, in <module>
    from checkmate.settings import Settings as CheckmateSettings
ImportError: No module named checkmate.settings

Once I patch __init__.py (all of them) with a simple from . import *,

Traceback (most recent call last):
  File "manage.py", line 2, in <module>
    from quantifiedcode.backend.commands import commands
  File "/root/quantifiedcode/quantifiedcode/backend/commands/__init__.py", line 6, in <module>
    from .server import runserver
  File "/root/quantifiedcode/quantifiedcode/backend/commands/server.py", line 2, in <module>
    from quantifiedcode.app import get_app
  File "/root/quantifiedcode/quantifiedcode/app.py", line 21, in <module>
    from quantifiedcode.backend.app import get_app as get_backend_app
  File "/root/quantifiedcode/quantifiedcode/backend/app.py", line 22, in <module>
    from .api.v1 import routes as routes_v1
  File "/root/quantifiedcode/quantifiedcode/backend/api/v1/__init__.py", line 1, in <module>
    from .routes import routes
  File "/root/quantifiedcode/quantifiedcode/backend/api/v1/routes.py", line 51, in <module>
    from .issue import (
  File "/root/quantifiedcode/quantifiedcode/backend/api/v1/issue.py", line 18, in <module>
    from .forms.issue_status import IssueStatusForm
  File "/root/quantifiedcode/quantifiedcode/backend/api/v1/forms/issue_status.py", line 6, in <module>
    class IssueStatusForm(Form):
  File "/root/quantifiedcode/quantifiedcode/backend/api/v1/forms/issue_status.py", line 9, in IssueStatusForm
    ignore_reason = SelectField(u"Ignore Reason", choices=[(str(Issue.IgnoreReason.false_positive),"false positive"),
AttributeError: type object 'Issue' has no attribute 'IgnoreReason'
@voarsh
Copy link

voarsh commented Feb 21, 2019

Same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants