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

NameError: name 'Session' is not defined #5

Closed
delleceste opened this issue Oct 25, 2023 · 17 comments
Closed

NameError: name 'Session' is not defined #5

delleceste opened this issue Oct 25, 2023 · 17 comments
Labels
bug Something isn't working

Comments

@delleceste
Copy link

Hello bbye98
Thanks for Your great job.
Which API are you using?
I've just contacted the qobuz team today for another issue and they told me there is no open API for security reasons.
That said. I am trying your module.
It does not load, with the following traceback:

File "", line 1, in
File "/archivi/Downloads/minim/src/minim/qobuz.py", line 1635, in
class Album:
File "/archivi/Downloads/minim/src/minim/qobuz.py", line 1776, in Album
session: Session = None, **kwargs):
^^^^^^^
NameError: name 'Session' is not defined

Having a quick look, I can't find any

class Session

defined in qobuz.py.

Regards, and thank You

@delleceste
Copy link
Author

OK, I see a class _API replaced class Session in the latest commit
Regards

@bbye98
Copy link
Owner

bbye98 commented Oct 25, 2023

Hello!

Currently, only the Spotify submodule is "finalized", in that the API probably won't change until the 1.0.0 release (see issue #4).

I will be moving some things around for the Qobuz submodule. Currently, you construct a Qobuz API object using minim.qobuz.Session. This will be changed to minim.qobuz.PrivateAPI in a future push, so please be cognizant of this change.

As for the TIDAL API, the class has been renamed from tidal.Session to tidal.PrivateAPI. I am currently working on implementing the new TIDAL Open API as tidal.API.

@bbye98 bbye98 added the bug Something isn't working label Oct 27, 2023
@bbye98
Copy link
Owner

bbye98 commented Oct 28, 2023

Hey @delleceste, since I haven't heard back from you in a few days, I'll go ahead and close this issue. Feel free to reopen it if you run into a similar issue!

@bbye98 bbye98 closed this as completed Oct 28, 2023
@delleceste
Copy link
Author

delleceste commented Oct 28, 2023 via email

@bbye98
Copy link
Owner

bbye98 commented Oct 28, 2023

@delleceste Hi! I made a commit previous that changes the name of the Qobuz API class to minim.qobuz.PrivateAPI, and this will be the new name moving forwards. It's recommended that you git pull to make sure you have the most recent version. I appreciate your patience as I clean up/refactor the codebase.

@delleceste
Copy link
Author

delleceste commented Oct 30, 2023 via email

@bbye98
Copy link
Owner

bbye98 commented Oct 30, 2023

Unfortunately, I'm not familiar with the inner workings of mpc or the Music Player Daemon (MPD). Sorry!

@delleceste
Copy link
Author

delleceste commented Nov 2, 2023 via email

@bbye98
Copy link
Owner

bbye98 commented Nov 3, 2023

Access token storage is in the plans. I just haven't gotten around to the Qobuz submodule yet. Follow issue #4 for updates.

@delleceste
Copy link
Author

delleceste commented Nov 3, 2023 via email

@bbye98
Copy link
Owner

bbye98 commented Nov 3, 2023

Qobuz does not have an open/public API, and they have not announced any plans to release one.

minim.qobuz implements the private Qobuz API that is used by their web player to retrieve Qobuz catalog information. It is "official" by all means, but Qobuz will not offer any support to developers building on it since it is technically not open to the public.

@delleceste
Copy link
Author

delleceste commented Nov 3, 2023 via email

@bbye98
Copy link
Owner

bbye98 commented Nov 3, 2023

Yes, this is covered in the documentation for minim.Qobuz. Until Qobuz implements a public API, minim and other Qobuz API implementations on GitHub are the only ways to get Qobuz catalog information easily.

@delleceste
Copy link
Author

delleceste commented Nov 3, 2023 via email

@bbye98
Copy link
Owner

bbye98 commented Nov 5, 2023

I've added support for authentication token caching for the private Qobuz API in commit a1dec5d. Try it out and let me know if it works!

@delleceste
Copy link
Author

delleceste commented Nov 6, 2023 via email

@delleceste
Copy link
Author

delleceste commented Nov 7, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants