sanic-admin icon indicating copy to clipboard operation
sanic-admin copied to clipboard

Can't import blueprints with -urls

Open Garito opened this issue 8 years ago • 2 comments

Hi! I'm trying to use your reloaded (it was about time to sanic ecosystem, so thanks a lot) and I am intriged with the -urls so I've activated them to take a peek This is the result with a code that works without the -urls activated (so the only change was -urls)

Traceback (most recent call last):
  File "/Users/garito/Lab/sanic/testRestAPI2/env/bin/sanic-admin", line 11, in <module>
    load_entry_point('sanic-admin==0.0.6', 'console_scripts', 'sanic-admin')()
  File "/Users/garito/Lab/sanic/testRestAPI2/env/lib/python3.6/site-packages/sanic_admin/entry_point.py", line 34, in run
    sanic_admin.urls.run(setting)
  File "/Users/garito/Lab/sanic/testRestAPI2/env/lib/python3.6/site-packages/sanic_admin/urls.py", line 12, in run
    loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
  File "app.py", line 6, in <module>
    from bps.user import bp as userBP
ModuleNotFoundError: No module named 'bps'

Are you aware? How can I help?

Thanks and I hope this library will have success

Garito avatar Nov 02 '17 20:11 Garito

Hi, Garito. It seems to be caused by not being able to load the bps module.

It is only file name, as below.

sanic-admin -urls server.py

38elements avatar Nov 03 '17 01:11 38elements

I notice but if I don't use -urls it works as expected... What am I missing?

Garito avatar Nov 03 '17 01:11 Garito