Packit-service: AttributeError: 'NoneType' object has no attribute 'namespace'

Created on 18 Aug 2020  路  3Comments  路  Source: packit/packit-service

No idea why it's not being caught in Sentry so pasting here manually.
This is in packit-service@stg pod logs after accessing https://stg.packit.dev/api/srpm-builds?page=6&per_page=20

 mod_wsgi (pid=20): Exception occurred processing WSGI script '/usr/share/packit/packit.wsgi'.
 "GET /api/srpm-builds?page=6&per_page=20 HTTP/1.1" 500 538
 Traceback (most recent call last):
   File "/usr/local/lib64/python3.7/site-packages/werkzeug/middleware/dispatcher.py", line 66, in __call__
     return app(environ, start_response)
   File "/usr/local/lib64/python3.7/site-packages/flask/app.py", line 2464, in __call__
     return self.wsgi_app(environ, start_response)
   File "/usr/local/lib64/python3.7/site-packages/flask/app.py", line 2450, in wsgi_app
     response = self.handle_exception(e)
   File "/usr/local/lib/python3.7/site-packages/flask_restx/api.py", line 638, in error_router
     return original_handler(f)
   File "/usr/local/lib64/python3.7/site-packages/flask/app.py", line 1867, in handle_exception
     reraise(exc_type, exc_value, tb)
   File "/usr/local/lib64/python3.7/site-packages/flask/_compat.py", line 39, in reraise
     raise value
   File "/usr/local/lib/python3.7/site-packages/flask_restx/api.py", line 636, in error_router
     return self.handle_error(e)
   File "/usr/local/lib64/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
     response = self.full_dispatch_request()
   File "/usr/local/lib64/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
     rv = self.handle_user_exception(e)
   File "/usr/local/lib/python3.7/site-packages/flask_restx/api.py", line 638, in error_router
     return original_handler(f)
   File "/usr/local/lib64/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
     reraise(exc_type, exc_value, tb)
   File "/usr/local/lib64/python3.7/site-packages/flask/_compat.py", line 39, in reraise
     raise value
   File "/usr/local/lib/python3.7/site-packages/flask_restx/api.py", line 636, in error_router
     return self.handle_error(e)
   File "/usr/local/lib64/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
     rv = self.dispatch_request()
   File "/usr/local/lib64/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
     return self.view_functions[rule.endpoint](**req.view_args)
   File "/usr/local/lib/python3.7/site-packages/flask_restx/api.py", line 375, in wrapper
     resp = resource(*args, **kwargs)
   File "/usr/local/lib64/python3.7/site-packages/flask/views.py", line 89, in view
     return self.dispatch_request(*args, **kwargs)
   File "/usr/local/lib/python3.7/site-packages/flask_restx/resource.py", line 44, in dispatch_request
     resp = meth(*args, **kwargs)
   File "/usr/local/lib/python3.7/site-packages/packit_service/service/api/srpm_builds.py", line 60, in get
     "repo_namespace": project.namespace,
 AttributeError: 'NoneType' object has no attribute 'namespace'

Most helpful comment

Sentry isnt enabled in the service pod.

We should fix that since the API is getting a lot of use lately.

All 3 comments

Thanks.

No idea why it's not being caught in Sentry

Sentry isnt enabled in the service pod.

Sentry isnt enabled in the service pod.

We should fix that since the API is getting a lot of use lately.

Sentry issue: RED-HAT-0P-2SQ

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TomasTomecek picture TomasTomecek  路  4Comments

TomasTomecek picture TomasTomecek  路  10Comments

shreyaspapi picture shreyaspapi  路  9Comments

StykMartin picture StykMartin  路  10Comments

TomasTomecek picture TomasTomecek  路  5Comments