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

Search returns non-existent release ids #130

Open
rexovas opened this issue May 5, 2023 · 3 comments
Open

Search returns non-existent release ids #130

rexovas opened this issue May 5, 2023 · 3 comments
Labels
Discogs API Issue Issue lies with the Discogs API, nothing we can do

Comments

@rexovas
Copy link

rexovas commented May 5, 2023

Came across this strange issue recently. This may not be an issue with the api client, but rather discogs' api itself.

It seems the search api can sometimes return "dormant" or otherwise hidden release ids which when attempting to access any real information about them results in a 404 error.

Here's an example:
https://www.discogs.com/release/6926394

As you can see the link opens up to a 404 page

This release_id was returned (along with others) from the following search:

>>> results = d.search("DOIN THE DO", type="release", artist="BETTY BOO", label="RHYTHM KING")

>>> len(results)
47

>>> for i, release in enumerate(results):
...    print(release)
    
1 <Release 142429 "Betty Boo - Doin' The Do">
2 <Release 95314 "Betty Boo - Doin' The Do">
3 <Release 187294 "Betty Boo - Doin' The Do">
4 <Release 166172 "Betty Boo - Doin' The Do">
...
36 <Release 6926394 "Betty Boo - Doin' The Do"> # <-- BAD BOY
...

Calling

>>> results[36].data
{'country': 'UK', 'year': '1990', 'format': ['Vinyl', '12"', '45 RPM'], 'label': ['Rhythm King Records'], 'type': 'release', 'genre': ['Electronic', 'Pop'], 'style': ['House'], 'id': 6926394, 'barcode': ['5 016026 202392'], 'user_data': {'in_wantlist': False, 'in_collection': False}, 'master_id': 0, 'master_url': None, 'uri': '/Betty-Boo-Doin-The-Do/release/6926394', 'catno': 'LEFT 39T', 'title': "Betty Boo - Doin' The Do", 'thumb': '', 'cover_image': 'https://st.discogs.com/a33995aba384fd3cd0220d23d1e16c75f59d9927/images/spacer.gif', 'resource_url': 'https://api.discogs.com/releases/6926394', 'community': {'want': 0, 'have': 0}, 'format_quantity': 1, 'formats': [{'name': 'Vinyl', 'qty': '1', 'descriptions': ['12"', '45 RPM']}]}

will strangely yield the above results

but calling the refresh method

>>> results[36].refresh()
    raise HTTPError(body['message'], status_code)
discogs_client.exceptions.HTTPError: 404: Release not found.

results in a 404

Furthermore, simply attempting to fetch the release by ID also results in a 404

>>> d.release(6926394)
    raise HTTPError(body['message'], status_code)
discogs_client.exceptions.HTTPError: 404: Release not found.

I can only assume this is some strange deleted release or otherwise invalid release which is still being returned in search results

@AnssiAhola AnssiAhola added the Discogs API Issue Issue lies with the Discogs API, nothing we can do label May 10, 2023
@AnssiAhola
Copy link
Contributor

AnssiAhola commented May 10, 2023

Thanks for reporting this.
I don't think there's anything we can do, as the issue seems to be on Discogs end.

I'll leave this up for now in case someone else comes across this issue.

@rexovas
Copy link
Author

rexovas commented May 30, 2023

Chiming back in here - I was able to confirm that this issue in fact exists when using the Discogs site itself.

You can verify by searching "4FOR MONEY IT'S A MOMENT IN TIME TEMPO", which yields a single result.
When clicking on the result, it brings you to a 404 page. I will perhaps file a bug ticket with Discogs.

@JOJ0
Copy link
Contributor

JOJ0 commented May 31, 2023

Awesome! Thanks! Please keep us updated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discogs API Issue Issue lies with the Discogs API, nothing we can do
Projects
Development

No branches or pull requests

3 participants