shinrax2/PS3GameUpdateDownloader

Uncaught exception: module 'time' has no attribute 'clock' on update download.

PoorPocketsMcNewHold opened this issue · 5 comments

Sadly, the logs doesn’t seem to report anything there.

Here's one time I’ve tried with multiples games :

[INFO] 2020-07-06 13:50:56.960957 No configuration file found! Using defaults!
[INFO] 2020-07-06 13:50:56.965531 PS3GameUpdateDownloader v006
[INFO] 2020-07-06 13:50:56.967655 Config File: ./config.json
[INFO] 2020-07-06 13:50:56.970281 Language: en


[INFO] 2020-07-06 13:50:56.972757 Current working directory: /home/pm/PS3GameUpdateDownloader
[INFO] 2020-07-06 13:50:56.975388 Compiled: False
[INFO] 2020-07-06 13:50:56.982503 Loaded TitleDB "titledb.json"
[INFO] 2020-07-06 13:50:57.220479 Already on the newest release!
[INFO] 2020-07-06 13:51:24.565790 Game is: Castlevania: Lords of Shadow 2 (NTSC-U)	 TitleID: BLUS30999
[INFO] 2020-07-06 13:51:38.734860 Game is: Dark Souls II (NTSC-U)	 TitleID: BLUS41045
[INFO] 2020-07-06 13:52:11.658911 Game is: Dragons Crown (NTSC-U)	 TitleID: BLUS30767
[INFO] 2020-07-06 13:52:26.673059 Game is: Persona 4 Arena Ultimax (NTSC-U)	 TitleID: BLUS31469
[INFO] 2020-07-06 13:52:51.366867 Game is: Prince of Persia: The Forgotten Sands (PAL)	 TitleID: BLES00839
[INFO] 2020-07-06 13:53:02.075208 Game is: Skate 3 (NTSC-U)	 TitleID: BLUS30464
[INFO] 2020-07-06 13:53:11.378034 Game is: Sonic & All-Stars Racing Transformed (PAL)	 TitleID: BLES01646
[INFO] 2020-07-06 13:53:25.680092 Game is: Army of Two: The Devils Cartel (PAL)	 TitleID: BLES01763
[INFO] 2020-07-06 13:53:36.042914 Game is: God of War III (PAL)	 TitleID: BCES00510
[INFO] 2020-07-06 13:53:46.397443 Game is: GRID Autosport (NTSC-U)	 TitleID: BLUS31452
[INFO] 2020-07-06 13:53:56.339515 Game is: Metal Gear Solid 4: Guns of the Patriots (NTSC-U)	 TitleID: BLUS30109
[INFO] 2020-07-06 13:54:06.291208 Game is: Need for Speed: Undercover (PAL)	 TitleID: BLES00450
[INFO] 2020-07-06 13:54:15.745362 Game is: Sniper Elite III (PAL)	 TitleID: BLES01981
[INFO] 2020-07-06 13:54:24.739441 Game is: Sniper: Ghost Warrior 2 Limited Edition (PAL)	 TitleID: BLES01527
[INFO] 2020-07-06 13:54:34.698432 Game is: Sonic Generations (PAL)	 TitleID: BLES01236
[INFO] 2020-07-06 13:54:43.841584 Game is: Split / Second (NTSC-U)	 TitleID: BLUS30300
[INFO] 2020-07-06 13:54:53.591685 Game is: SSX (NTSC-U)	 TitleID: BLUS30849
[INFO] 2020-07-06 13:55:05.127085 Starting download of updates
[INFO] 2020-07-06 13:55:05.142895 Starting download 1 of 18

No difference when trying with only one game download at a time.

[INFO] 2020-07-06 13:55:26.698976 No configuration file found! Using defaults!
[INFO] 2020-07-06 13:55:26.708359 PS3GameUpdateDownloader v006
[INFO] 2020-07-06 13:55:26.711052 Config File: ./config.json
[INFO] 2020-07-06 13:55:26.713569 Language: en


[INFO] 2020-07-06 13:55:26.715668 Current working directory: /home/pm/PS3GameUpdateDownloader
[INFO] 2020-07-06 13:55:26.718183 Compiled: False
[INFO] 2020-07-06 13:55:26.724555 Loaded TitleDB "titledb.json"
[INFO] 2020-07-06 13:55:27.122719 Already on the newest release!
[INFO] 2020-07-06 13:55:33.106992 Game is: SSX (NTSC-U)	 TitleID: BLUS30849
[INFO] 2020-07-06 13:55:35.320214 Starting download of updates
[INFO] 2020-07-06 13:55:35.336051 Starting download 1 of 1

And of course, All the python dependencies are installed :

 pm@VIX  /home/pm/PS3GameUpdateDownloader   master ✔  python -m pip install -r requirements.txt                                                                                                                                                                                                                                                                                                                                                                                     13:50:31 
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: requests in /home/pm/.local/lib/python3.8/site-packages (from -r requirements.txt (line 1)) (2.22.0)
Collecting pysimplegui
  Downloading PySimpleGUI-4.24.0-py3-none-any.whl (339 kB)
     |████████████████████████████████| 339 kB 918 kB/s 
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/lib/python3.8/site-packages (from requests->-r requirements.txt (line 1)) (1.25.9)
Requirement already satisfied: certifi>=2017.4.17 in /home/pm/.local/lib/python3.8/site-packages (from requests->-r requirements.txt (line 1)) (2020.4.5.2)
Requirement already satisfied: idna<2.9,>=2.5 in /home/pm/.local/lib/python3.8/site-packages (from requests->-r requirements.txt (line 1)) (2.8)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib/python3.8/site-packages (from requests->-r requirements.txt (line 1)) (3.0.4)
Installing collected packages: pysimplegui
Successfully installed pysimplegui-4.24.0

thanks for your report :)

i cant replicate your crash neither on my windows or debian machine
could you please provide me some more info about your OS and exact python version?

also does it give any additional info in the console when you run it and it crashes like some Exception?

edit:
i added code to the latest master to catch crashes and dump the information
could you please reproduce the crash on your end with the lastest master and attach the latest crash.txt from the logs folder

Using python 3.8.3-1

The content of the log file, indeed doesn´t help that much : 

[INFO] 2020-07-07 15:20:12.218086 No configuration file found! Using defaults!
[INFO] 2020-07-07 15:20:12.221121 PS3GameUpdateDownloader v006
[INFO] 2020-07-07 15:20:12.223756 Config File: ./config.json
[INFO] 2020-07-07 15:20:12.226357 Language: en


[INFO] 2020-07-07 15:20:12.228878 Current working directory: /home/pm/PS3GameUpdateDownloader
[INFO] 2020-07-07 15:20:12.231377 Compiled: False
[INFO] 2020-07-07 15:20:12.238253 Loaded TitleDB "titledb.json"
[INFO] 2020-07-07 15:20:12.690753 Already on the newest release!
[INFO] 2020-07-07 15:20:28.983227 Game is: Castlevania: Lords of Shadow 2 (NTSC-U)       TitleID: BLUS30999
[INFO] 2020-07-07 15:20:44.264189 Game is: Dragons Crown (NTSC-U)        TitleID: BLUS30767
[INFO] 2020-07-07 15:20:50.166782 Starting download of updates
[INFO] 2020-07-07 15:20:50.183897 Starting download 1 of 2

However, here´s the content of the Crash file : 

Uncaught exception:
Type: <class 'AttributeError'>
Value: module 'time' has no attribute 'clock'
Traceback:
  File "main.py", line 310, in <module>
    ps3.downloadFiles(window)
  File "/home/pm/PS3GameUpdateDownloader/PS3GUD.py", line 182, in downloadFiles
    self._download_file(url, fname, size, window, i)
  File "/home/pm/PS3GameUpdateDownloader/PS3GUD.py", line 208, in _download_file
    start = time.clock()

time.clock() has been deprecated in 3.3 and removed in 3.8
sorry my bad for using that ill rewrite that section if you need the code to run immediately you could downgrade to python 3.7

should be fixed in 8e17e34
could you please verify that for me?
i dont have a py3.8 setup at hand right now

Yep. Fixed! It downloads those updates just fine, thanks!