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

[BUG] 'Dummy' object has no attribute 'downloaded' #763

Open
FrenchGithubUser opened this issue Oct 28, 2024 · 3 comments
Open

[BUG] 'Dummy' object has no attribute 'downloaded' #763

FrenchGithubUser opened this issue Oct 28, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@FrenchGithubUser
Copy link

FrenchGithubUser commented Oct 28, 2024

Describe the bug

I'm trying to use the streamrip lib in a python script like so :

async def main():
    try:
        config = Config("streamrip_config.toml")
        deezer_client = DeezerClient(config=config)
        await deezer_client.login()
        print("Logged in:", deezer_client.logged_in)
        p = PendingAlbum(album_id, deezer_client, config, Dummy())
        resolved_album = await p.resolve()
        print(resolved_album.meta)  # Print metadata for verification
        await resolved_album.rip()
        print("Release downloaded successfully!")
        
    except Exception as e:
        print("An error occurred while downloading the release:")
        print(e)
 

if __name__ == "__main__":
    asyncio.run(main())

And getting this error :

'Dummy' object has no attribute 'downloaded'
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x75bef26d0440>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x75bef2676450>, 19694.222413349), (<aiohttp.client_proto.ResponseHandler object at 0x75bef2676750>, 19694.304548539)]']
connector: <aiohttp.connector.TCPConnector object at 0x75bef26d0470>

Command Used

python lib

Debug Traceback

done

Config File

not needed

Operating System

linux

streamrip version

2.0.5

Screenshots and recordings

No response

Additional context

No response

@FrenchGithubUser FrenchGithubUser added the bug Something isn't working label Oct 28, 2024
@Ilaprgg2
Copy link

that's not how it works.
`from streamrip.db import Dummy, Database
...
db = Database(downloads=Dummy(), failed=Dummy())
...
p = PendingAlbum(album_id, deezer_client, config, db)

`

@FrenchGithubUser
Copy link
Author

FrenchGithubUser commented Oct 28, 2024

Thanks for the correction !

I used what was in the wiki, it should be updated then I guess ?

@Ilaprgg2
Copy link

yes. the information on the wiki is so minimal. I needed to review the source code to understand what it is

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