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

CB-356: Implemented handling of deleted entities #270

Open
wants to merge 3 commits into
base: master
from

Conversation

@spellew
Copy link
Contributor

commented Jul 19, 2019

Set unknown_entities_for_missing flag to True for fetch_multiple_* calls

@spellew

This comment has been minimized.

Copy link
Contributor Author

commented Jul 20, 2019

@ferbncode Tests failed due to the outdated brainzutils dependency, I'll be sure to update requirements.txt after my brainzutils pull request gets merged.

@ferbncode

This comment has been minimized.

Copy link
Collaborator

commented Aug 1, 2019

Hi @spellew, now that your PR in python-brainzutils is merged and released, could you also update this PR and other ones to have the latest version for brainzutils? Thanks :)

@ferbncode

This comment has been minimized.

Copy link
Collaborator

commented Aug 8, 2019

@spellew Let's update the brainzutils version here as well :)

@ferbncode

This comment has been minimized.

Copy link
Collaborator

commented Aug 21, 2019

@spellew In the unknown entities file, could you please fix and define artists for artist_credit.artists? Below is the exception I get while loading a unknown entity. Also, please modify the tests that you added to brainzutils for unknown entities to add includes.

critiquebrainz_1        | 172.28.0.1 - - [21/Aug/2019 21:46:54] "GET /release-group/c6aa40a3-479d-4a28-89e7-609816899293 HTTP/1.1" 500 -
critiquebrainz_1        | Traceback (most recent call last):
critiquebrainz_1        |   File "/usr/local/lib/python3.7/site-packages/werkzeug/middleware/dispatcher.py", line 66, in __call__
critiquebrainz_1        |     return app(environ, start_response)
critiquebrainz_1        |   File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2309, in __call__
critiquebrainz_1        |     return self.wsgi_app(environ, start_response)
critiquebrainz_1        |   File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2295, in wsgi_app
critiquebrainz_1        |     response = self.handle_exception(e)
critiquebrainz_1        |   File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1741, in handle_exception
critiquebrainz_1        |     reraise(exc_type, exc_value, tb)
critiquebrainz_1        |   File "/usr/local/lib/python3.7/site-packages/flask/_compat.py", line 35, in reraise
critiquebrainz_1        |     raise value
critiquebrainz_1        |   File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2292, in wsgi_app
critiquebrainz_1        |     response = self.full_dispatch_request()
critiquebrainz_1        |   File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
critiquebrainz_1        |     rv = self.handle_user_exception(e)
critiquebrainz_1        |   File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1718, in handle_user_exception
critiquebrainz_1        |     reraise(exc_type, exc_value, tb)
critiquebrainz_1        |   File "/usr/local/lib/python3.7/site-packages/flask/_compat.py", line 35, in reraise
critiquebrainz_1        |     raise value
critiquebrainz_1        |   File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
critiquebrainz_1        |     rv = self.dispatch_request()
critiquebrainz_1        |   File "/usr/local/lib/python3.7/site-packages/flask_debugtoolbar/__init__.py", line 125, in dispatch_request
critiquebrainz_1        |     return view_func(**req.view_args)
critiquebrainz_1        |   File "/code/critiquebrainz/frontend/views/release_group.py", line 39, in entity
critiquebrainz_1        |     release_group = mb_release_group.get_release_group_by_id(id)
critiquebrainz_1        |   File "/code/critiquebrainz/frontend/external/musicbrainz_db/release_group.py", line 15, in get_release_group_by_id
critiquebrainz_1        |     unknown_entities_for_missing=True,
critiquebrainz_1        |   File "/usr/local/lib/python3.7/site-packages/brainzutils/musicbrainz_db/release_group.py", line 62, in fetch_multiple_release_groups
critiquebrainz_1        |     artist_credit_names = release_group.artist_credit.artists
critiquebrainz_1        | AttributeError: 'NoneType' object has no attribute 'artists'
@spellew

This comment has been minimized.

Copy link
Contributor Author

commented Aug 22, 2019

@ferbncode I've created a brainzutils pull request to fix the unknown entities bug.
metabrainz/brainzutils-python#36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.