MiniDude22 / Pandora-Downloader

Allows you to download music from Pandora, while running a tiny Flask python server.
33 stars 10 forks source link

Continuous Download issue #14

Open x106x opened 6 years ago

x106x commented 6 years ago

Downloading "Fireball (Feat. John Ryan)" <<-- COMPLETED SUCESSFULLY

<<-- SKIP BUTTON PRESSED-->>

Downloading "Fireball (Feat. John Ryan)" <<--NOT THE CORRECT NAME, FILE NOT DOWNLOADED-->>

127.0.0.1 - - [05/Jun/2018 09:31:13] "POST /download HTTP/1.1" 500 - Traceback (most recent call last): File "C:\Python27\lib\site-packages\flask\app.py", line 2309, in call return self.wsgi_app(environ, start_response) File "C:\Python27\lib\site-packages\flask\app.py", line 2295, in wsgi_app response = self.handle_exception(e) File "C:\Python27\lib\site-packages\flask\app.py", line 1741, in handle_exception reraise(exc_type, exc_value, tb) File "C:\Python27\lib\site-packages\flask\app.py", line 2292, in wsgi_app response = self.full_dispatch_request() File "C:\Python27\lib\site-packages\flask\app.py", line 1815, in full_dispatch_request rv = self.handle_user_exception(e) File "C:\Python27\lib\site-packages\flask\app.py", line 1718, in handle_user_exception reraise(exc_type, exc_value, tb) File "C:\Python27\lib\site-packages\flask\app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "C:\Python27\lib\site-packages\flask\app.py", line 1799, in dispatch_request return self.view_functionsrule.endpoint File "C:\Python27\Scripts\PandoraDownloader\flask_server.py", line 57, in pandoraDownloader if not os.path.isdir( os.path.split(song_path)[0] ): os.makedirs( os.path.split(song_path)[0] ) File "C:\Python27\lib\os.py", line 157, in makedirs mkdir(name, mode) WindowsError: [Error 183] Cannot create a file when that file already exists: u'C:\Users\username\Music\Pandora\Dance Pop Radio\Pitbull' Download Complete! 127.0.0.1 - - [05/Jun/2018 09:31:15] "POST /download HTTP/1.1" 200 - Downloading "CAN'T STOP THE FEELING! (Original Song From DreamWorks Animation's "Trolls")" <<--CORRECT NAME and EMPTY FILE DOWNLOADED (DIDN'T WORK)-->

Downloading "CAN'T STOP THE FEELING! (Original Song From DreamWorks Animation's "Trolls")" 127.0.0.1 - - [05/Jun/2018 09:31:55] "POST /download HTTP/1.1" 500 - 127.0.0.1 - - [05/Jun/2018 09:31:55] "POST /download HTTP/1.1" 500 - Traceback (most recent call last): File "C:\Python27\lib\site-packages\flask\app.py", line 2309, in call return self.wsgi_app(environ, start_response) File "C:\Python27\lib\site-packages\flask\app.py", line 2295, in wsgi_app response = self.handle_exception(e) File "C:\Python27\lib\site-packages\flask\app.py", line 1741, in handle_exception reraise(exc_type, exc_value, tb) File "C:\Python27\lib\site-packages\flask\app.py", line 2292, in wsgi_app response = self.full_dispatch_request() File "C:\Python27\lib\site-packages\flask\app.py", line 1815, in full_dispatch_request rv = self.handle_user_exception(e) File "C:\Python27\lib\site-packages\flask\app.py", line 1718, in handle_user_exception reraise(exc_type, exc_value, tb) File "C:\Python27\lib\site-packages\flask\app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "C:\Python27\lib\site-packages\flask\app.py", line 1799, in dispatch_request return self.view_functionsrule.endpoint File "C:\Python27\Scripts\PandoraDownloader\flask_server.py", line 77, in pandoraDownloader song.save() File "C:\Python27\lib\site-packages\mutagen\mp4__init.py", line 1088, in save super(MP4, self).save(*args, kwargs) File "C:\Python27\lib\site-packages\mutagen_util.py", line 140, in wrapper return func(self, h, args, kwargs) File "C:\Python27\lib\site-packages\mutagen_file.py", line 133, in save return self.tags.save(filething, kwargs) File "C:\Python27\lib\site-packages\mutagen_util.py", line 169, in wrapper return func(args, kwargs) File "C:\Python27\lib\site-packages\mutagen_util.py", line 140, in wrapper return func(self, h, *args, **kwargs) File "C:\Python27\lib\site-packages\mutagen\mp4__init.py", line 424, in save self.save(filething.fileobj, atoms, data, padding) File "C:\Python27\lib\site-packages\mutagen\mp4__init.py", line 430, in save self.__save_new(fileobj, atoms, data, padding) File "C:\Python27\lib\site-packages\mutagen\mp4__init.py", line 466, in save_new self.update_offsets(fileobj, atoms, len(data), offset) File "C:\Python27\lib\site-packages\mutagen\mp4__init.py", line 549, in update_offsets self.update_offset_table(fileobj, ">%dI", atom, delta, offset) File "C:\Python27\lib\site-packages\mutagen\mp4__init.py", line 525, in update_offset_table offsets = struct.unpack(fmt, data[4:]) MemoryError Traceback (most recent call last): File "C:\Python27\lib\site-packages\flask\app.py", line 2309, in call return self.wsgi_app(environ, start_response) File "C:\Python27\lib\site-packages\flask\app.py", line 2295, in wsgi_app response = self.handle_exception(e) File "C:\Python27\lib\site-packages\flask\app.py", line 1741, in handle_exception reraise(exc_type, exc_value, tb) File "C:\Python27\lib\site-packages\flask\app.py", line 2292, in wsgi_app response = self.full_dispatch_request() File "C:\Python27\lib\site-packages\flask\app.py", line 1815, in full_dispatch_request rv = self.handle_user_exception(e) File "C:\Python27\lib\site-packages\flask\app.py", line 1718, in handle_user_exception reraise(exc_type, exc_value, tb) File "C:\Python27\lib\site-packages\flask\app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "C:\Python27\lib\site-packages\flask\app.py", line 1799, in dispatch_request return self.view_functionsrule.endpoint File "C:\Python27\Scripts\PandoraDownloader\flask_server.py", line 77, in pandoraDownloader song.save() File "C:\Python27\lib\site-packages\mutagen\mp4__init.py", line 1088, in save super(MP4, self).save(*args, kwargs) File "C:\Python27\lib\site-packages\mutagen_util.py", line 140, in wrapper return func(self, h, args, kwargs) File "C:\Python27\lib\site-packages\mutagen_file.py", line 133, in save return self.tags.save(filething, kwargs) File "C:\Python27\lib\site-packages\mutagen_util.py", line 169, in wrapper return func(args, kwargs) File "C:\Python27\lib\site-packages\mutagen_util.py", line 140, in wrapper return func(self, h, *args, **kwargs) File "C:\Python27\lib\site-packages\mutagen\mp4__init.py", line 424, in save self.save(filething.fileobj, atoms, data, padding) File "C:\Python27\lib\site-packages\mutagen\mp4__init.py", line 430, in save self.__save_new(fileobj, atoms, data, padding) File "C:\Python27\lib\site-packages\mutagen\mp4\init.py", line 466, in save_new self.update_offsets(fileobj, atoms, len(data), offset) File "C:\Python27\lib\site-packages\mutagen\mp4__init.py", line 549, in update_offsets self.update_offset_table(fileobj, ">%dI", atom, delta, offset) File "C:\Python27\lib\site-packages\mutagen\mp4\init.py", line 525, in update_offset_table offsets = struct.unpack(fmt, data[4:]) MemoryError

The next download which happened somewhere between trolls and the bottom happened successfully and had the correct label but the console is spitting out all these issues. Restarting chrome did not fix this, next downloads cause similar problems even if they work. Restarting flask and chrome solves the problem.

MiniDude22 commented 6 years ago

Okay. I removed the timer because it wasn't working correctly for me. I'll look at the continuous downloading when I get a chance.

x106x commented 6 years ago

Move the timer function to a button possibly for testing. If you leave a song paused that didn't download, I'm not sure of the duration but not long enough that Pandora plays a different song but long enough to meet your conditions, when you hit play it does trigger a successful download.