You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using app = Flask(__name__) (as stated in doc), your management script won't work dying on cryptic import like:
(tvocr) starenka /work/tvocr master at a7d02b8? % manage.py rq worker default
Traceback (most recent call last):
File "/data/.envs/tvocr/bin/manage.py", line 6, in <module>
exec(compile(open(__file__).read(), __file__, 'exec'))
File "/work/tvocr/tvocr/api/manage.py", line 13, in <module>
manager.run()
File "/data/.envs/tvocr/local/lib/python2.7/site-packages/flask_script/__init__.py", line 417, in run
result = self.handle(argv[0], argv[1:])
File "/data/.envs/tvocr/local/lib/python2.7/site-packages/flask_script/__init__.py", line 386, in handle
res = handle(*args, **config)
File "/data/.envs/tvocr/local/lib/python2.7/site-packages/flask_rq2/script.py", line 42, in __call__
return self.run(*args, **kwargs)
File "/data/.envs/tvocr/local/lib/python2.7/site-packages/flask_rq2/script.py", line 180, in run
queues=queues or self.rq.queues,
File "/data/.envs/tvocr/local/lib/python2.7/site-packages/rq/cli/cli.py", line 175, in worker
worker_class = import_attribute(worker_class)
File "/data/.envs/tvocr/local/lib/python2.7/site-packages/rq/utils.py", line 150, in import_attribute
module = importlib.import_module(module_name)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named backend_tvocr.api.app
using app = Flask('somename') would work fine.
Not sure if I missunderstand flask or rq2 or both, but bare with me and maybe fix the docs (or the code) ;)
The text was updated successfully, but these errors were encountered:
Heeey, so I dropped support for flask-script because I wasn't able to maintain both systems, Flask's official CLI support as well as the legacy flask-script system. The refactor that drops it landed in #41.
When using
app = Flask(__name__)
(as stated in doc), your management script won't work dying on cryptic import like:using
app = Flask('somename')
would work fine.Not sure if I missunderstand flask or rq2 or both, but bare with me and maybe fix the docs (or the code) ;)
The text was updated successfully, but these errors were encountered: