streamrip icon indicating copy to clipboard operation
streamrip copied to clipboard

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

Open FrenchGithubUser opened this issue 1 year ago • 3 comments

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 avatar Oct 28 '24 10:10 FrenchGithubUser

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)

`

Ilaprgg2 avatar Oct 28 '24 17:10 Ilaprgg2

Thanks for the correction !

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

FrenchGithubUser avatar Oct 28 '24 17:10 FrenchGithubUser

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

Ilaprgg2 avatar Oct 28 '24 17:10 Ilaprgg2