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

Error runing the webapi? #35

Open
adjebbar opened this issue Dec 20, 2021 · 3 comments
Open

Error runing the webapi? #35

adjebbar opened this issue Dec 20, 2021 · 3 comments

Comments

@adjebbar
Copy link

uvicorn run:app --reload
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: Started reloader process [36216]
INFO: Could not open font file /usr/share/fonts/truetype/noto/NotoColorEmoji.ttf: In FT2Font: Could not set the fontsize
INFO: generated new fontManager
Process SpawnProcess-1:
Traceback (most recent call last):
File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib/python3/dist-packages/uvicorn/subprocess.py", line 61, in subprocess_started
target(sockets=sockets)
File "/usr/lib/python3/dist-packages/uvicorn/main.py", line 382, in run
loop.run_until_complete(self.serve(sockets=sockets))
File "uvloop/loop.pyx", line 1501, in uvloop.loop.Loop.run_until_complete
File "/usr/lib/python3/dist-packages/uvicorn/main.py", line 389, in serve
config.load()
File "/usr/lib/python3/dist-packages/uvicorn/config.py", line 288, in load
self.loaded_app = import_from_string(self.app)
File "/usr/lib/python3/dist-packages/uvicorn/importer.py", line 20, in import_from_string
module = importlib.import_module(module_str)
File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 848, in exec_module
File "", line 219, in _call_with_frames_removed
File "/home/adjebbar/WorkDir/Web-API/./run.py", line 1, in
from app import create_app
File "/home/adjebbar/WorkDir/Web-API/./app/init.py", line 5, in
from app.http.controllers.api.PredictionController import PredictionController
File "/home/adjebbar/WorkDir/Web-API/./app/http/controllers/api/PredictionController.py", line 3, in
from skimage import io
File "/home/adjebbar/WorkDir/Web-API/myenv/lib/python3.8/site-packages/skimage/io/init.py", line 15, in
reset_plugins()
File "/home/adjebbar/WorkDir/Web-API/myenv/lib/python3.8/site-packages/skimage/io/manage_plugins.py", line 91, in reset_plugins
_load_preferred_plugins()
File "/home/adjebbar/WorkDir/Web-API/myenv/lib/python3.8/site-packages/skimage/io/manage_plugins.py", line 71, in _load_preferred_plugins
_set_plugin(p_type, preferred_plugins['all'])
File "/home/adjebbar/WorkDir/Web-API/myenv/lib/python3.8/site-packages/skimage/io/manage_plugins.py", line 83, in _set_plugin
use_plugin(plugin, kind=plugin_type)
File "/home/adjebbar/WorkDir/Web-API/myenv/lib/python3.8/site-packages/skimage/io/manage_plugins.py", line 254, in use_plugin
_load(name)
File "/home/adjebbar/WorkDir/Web-API/myenv/lib/python3.8/site-packages/skimage/io/manage_plugins.py", line 297, in _load
plugin_module = import('skimage.io._plugins.' + modname,
File "/home/adjebbar/WorkDir/Web-API/myenv/lib/python3.8/site-packages/skimage/io/_plugins/matplotlib_plugin.py", line 3, in
from mpl_toolkits.axes_grid1 import make_axes_locatable
File "/home/adjebbar/WorkDir/Web-API/myenv/lib/python3.8/site-packages/mpl_toolkits/axes_grid1/init.py", line 3, in
from .axes_grid import Grid, ImageGrid, AxesGrid
File "/home/adjebbar/WorkDir/Web-API/myenv/lib/python3.8/site-packages/mpl_toolkits/axes_grid1/axes_grid.py", line 22, in
class CbarAxesBase:
File "/home/adjebbar/WorkDir/Web-API/myenv/lib/python3.8/site-packages/mpl_toolkits/axes_grid1/axes_grid.py", line 62, in CbarAxesBase
cbid = cbook._deprecate_privatize_attribute(
AttributeError: module 'matplotlib.cbook' has no attribute '_deprecate_privatize_attribute'

@afariasfermin
Copy link
Member

it's looking more like a dependency error, you properly set up and install all dependencies describe in the requirement.txt?

@adjebbar
Copy link
Author

Now I get this error?
uvicorn run:app --reload
INFO: Will watch for changes in these directories: ['/home/djaber/WORK/Web-API']
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: Started reloader process [9610] using statreload
2021-12-22 11:23:49.067558: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory
2021-12-22 11:23:49.067609: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
INFO: Started server process [9612]
INFO: Waiting for application startup.
INFO: ASGI 'lifespan' protocol appears unsupported.
INFO: Application startup complete.
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/home/djaber/WORK/Web-API/webapi/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py", line 373, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "/home/djaber/WORK/Web-API/webapi/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 75, in call
return await self.app(scope, receive, send)
File "/home/djaber/WORK/Web-API/webapi/lib/python3.8/site-packages/uvicorn/middleware/asgi2.py", line 16, in call
instance = self.app(scope)
TypeError: call() missing 1 required positional argument: 'start_response'
INFO: 127.0.0.1:43282 - "GET / HTTP/1.1" 500 Internal Server Error
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/home/djaber/WORK/Web-API/webapi/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py", line 373, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "/home/djaber/WORK/Web-API/webapi/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 75, in call
return await self.app(scope, receive, send)
File "/home/djaber/WORK/Web-API/webapi/lib/python3.8/site-packages/uvicorn/middleware/asgi2.py", line 16, in call
instance = self.app(scope)
TypeError: call() missing 1 required positional argument: 'start_response'
INFO: 127.0.0.1:43284 - "GET /favicon.ico HTTP/1.1" 500 Internal Server Error

thanks

@adjebbar
Copy link
Author

Internal Server Error: http://127.0.0.1:8000/

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