datamgmt / Music-Chart-Downloader

Download Music Chart Data
0 stars 0 forks source link

Not working with charts pre-1970 #1

Open tim1f1 opened 3 weeks ago

tim1f1 commented 3 weeks ago

The code doesn't seem to be working for charts pre-1970? I've tried multiple date permutations, and I just get the same error message each time

C:\Users\tim_f\Music-Chart-Downloader>py mcd.py --chart uk-albums --startdate 19690101 --enddate 19700101 --output_type csv --output_set weekly
Traceback (most recent call last):
  File "C:\Users\tim_f\Music-Chart-Downloader\mcd.py", line 280, in <module>
    args = validate_args(setup_args().parse_args())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tim_f\Music-Chart-Downloader\mcd.py", line 245, in validate_args
    datetime.datetime.min.time()).timestamp()),
                                  ^^^^^^^^^^^
OSError: [Errno 22] Invalid argument

C:\Users\tim_f\Music-Chart-Downloader>
datamgmt commented 3 weeks ago

Hi

I'm sorry to see that. It looks like you are running on some version of Windows - which I don't have access to I work onOSX

When I do cut and paste the command line you provided I get :

./mcd.py --chart uk-albums --startdate 19690101 --enddate 19700101 --output_type csv --output_set weekly
1968-12-27
1969-01-03
1969-01-10
1969-01-17
1969-01-24
1969-01-31
1969-02-07
1969-02-14
1969-02-21
1969-02-28
1969-03-07
1969-03-14
1969-03-21
1969-03-28
1969-04-04
1969-04-11
1969-04-18
1969-04-25
1969-05-02
1969-05-09
1969-05-16
1969-05-23
1969-05-30
1969-06-06
1969-06-13
1969-06-20
1969-06-27
1969-07-04
1969-07-11
1969-07-18
1969-07-25
1969-08-01
1969-08-08
1969-08-15
1969-08-22
1969-08-29
1969-09-05
1969-09-12
1969-09-19
1969-09-26
1969-10-03
1969-10-10
1969-10-17
1969-10-24
1969-10-31
1969-11-07
1969-11-14
1969-11-21
1969-11-28
1969-12-05
1969-12-12
1969-12-19
1969-12-26
Finished

This implies to me that it may be something in datetime.datetime.min.time()).timestamp() from the library datetime in the Windows implementation

This error is very early in the process and is used twice in quick succession. The library is used 7 times overall.

Perhaps try updating this library or running it on OSX or Linux

Please let me know if you find a workaround. Also if it is a one off exercise I can just send you the files as I have run the command now

Prokopp commented 3 weeks ago

Maybe a Python version issue? Looks like timestamp was added in 3.3.

tim1f1 commented 2 weeks ago

Hi

I'm sorry to see that. It looks like you are running on some version of Windows - which I don't have access to I work onOSX

When I do cut and paste the command line you provided I get :

./mcd.py --chart uk-albums --startdate 19690101 --enddate 19700101 --output_type csv --output_set weekly
1968-12-27
1969-01-03
1969-01-10
1969-01-17
1969-01-24
1969-01-31
1969-02-07
1969-02-14
1969-02-21
1969-02-28
1969-03-07
1969-03-14
1969-03-21
1969-03-28
1969-04-04
1969-04-11
1969-04-18
1969-04-25
1969-05-02
1969-05-09
1969-05-16
1969-05-23
1969-05-30
1969-06-06
1969-06-13
1969-06-20
1969-06-27
1969-07-04
1969-07-11
1969-07-18
1969-07-25
1969-08-01
1969-08-08
1969-08-15
1969-08-22
1969-08-29
1969-09-05
1969-09-12
1969-09-19
1969-09-26
1969-10-03
1969-10-10
1969-10-17
1969-10-24
1969-10-31
1969-11-07
1969-11-14
1969-11-21
1969-11-28
1969-12-05
1969-12-12
1969-12-19
1969-12-26
Finished

This implies to me that it may be something in datetime.datetime.min.time()).timestamp() from the library datetime in the Windows implementation

This error is very early in the process and is used twice in quick succession. The library is used 7 times overall.

Perhaps try updating this library or running it on OSX or Linux

Please let me know if you find a workaround. Also if it is a one off exercise I can just send you the files as I have run the command now

Would you be able to send the complete CSVs for the singles/albums charts? I'd really appreciate that

tim1f1 commented 1 week ago

Hi

I'm sorry to see that. It looks like you are running on some version of Windows - which I don't have access to I work onOSX

When I do cut and paste the command line you provided I get :

./mcd.py --chart uk-albums --startdate 19690101 --enddate 19700101 --output_type csv --output_set weekly
1968-12-27
1969-01-03
1969-01-10
1969-01-17
1969-01-24
1969-01-31
1969-02-07
1969-02-14
1969-02-21
1969-02-28
1969-03-07
1969-03-14
1969-03-21
1969-03-28
1969-04-04
1969-04-11
1969-04-18
1969-04-25
1969-05-02
1969-05-09
1969-05-16
1969-05-23
1969-05-30
1969-06-06
1969-06-13
1969-06-20
1969-06-27
1969-07-04
1969-07-11
1969-07-18
1969-07-25
1969-08-01
1969-08-08
1969-08-15
1969-08-22
1969-08-29
1969-09-05
1969-09-12
1969-09-19
1969-09-26
1969-10-03
1969-10-10
1969-10-17
1969-10-24
1969-10-31
1969-11-07
1969-11-14
1969-11-21
1969-11-28
1969-12-05
1969-12-12
1969-12-19
1969-12-26
Finished

This implies to me that it may be something in datetime.datetime.min.time()).timestamp() from the library datetime in the Windows implementation

This error is very early in the process and is used twice in quick succession. The library is used 7 times overall.

Perhaps try updating this library or running it on OSX or Linux

Please let me know if you find a workaround. Also if it is a one off exercise I can just send you the files as I have run the command now

Hi David, I've been able to get it working. Here's the modified version of the mcd.py file that I'm using mcd2.txt