Coder Social home page Coder Social logo

Comments (12)

Salies avatar Salies commented on June 26, 2024 1

I have no idea on why that happens. Gonna test it out and try to fix it.
Thanks for the report =D

from steam-screenshot-backup-tool.

Salies avatar Salies commented on June 26, 2024 1

The screenshots urls are stored in a array. Maybe it's exceeding it's limit and resetting at some point. Will try to change that by storing it to a json file instead.

from steam-screenshot-backup-tool.

Salies avatar Salies commented on June 26, 2024 1

@Alsweider I've just pushed the .json solution I've talked about and it seems to be working just fine. I'll wait until it finishes downloading everything so I can be sure.

Just an important tip: make sure that your screenshot count is accurate, like mine is here:
image
If it's not, exit the program (Ctrl + C or by exiting the window) and try again. Sometimes I got it do detect only 100 screenshots, though that was before I implemented the json solution.

Please try again and tell me if it works. If it doesn't, provide me your Steam profile URL and I'll take a deeper look ;)

Also if you're using the app based on the Windows .exe you'll have to wait a little til I create another binary.

from steam-screenshot-backup-tool.

Salies avatar Salies commented on June 26, 2024 1

Nah the problem is neither of that. It's just with the descriptions. It's crashing when it's writing your screenshot's description to the image file. I've already filtered one exception to this once, but I think there's yet another one.

Will take a look, thanks again for collaborating. I'm definitely up for having the app working consistently (though that's not totally possible because of Steam), hate having my shit broken XD

from steam-screenshot-backup-tool.

Salies avatar Salies commented on June 26, 2024 1

@Alsweider Testing it with your account, I've ran into some really weird glitches that totally shouldn't be happening. That's great, actually, since I'm able to fully debug it with plenty of data. I'll try to fix it, but if I doesn't, I might just rewrite the whole thing using puppeteer. If the latter is the case, I'll tell you when the program is ready (I will test it by downloading all of your screenshots XD).

from steam-screenshot-backup-tool.

Alsweider avatar Alsweider commented on June 26, 2024

Indeed, I had used the .exe, but I just installed Python on Windows and downloaded the requirements. Additionally, I had to add the data.json file to the project folder manually. So now it seems to really work much better :-) It's now downloading 4547 of my 5910 screenshots. I'm still waiting for it to finish, but the folders are already filling with good pictures. I'm pretty sure though that I don't have 1363 screenshots on private (just 13 for friends only), so it must be a different problem which is preventing the tool from finding the rest. But it's a very good start.
2020-02-25 03_07_38-C__WINDOWS_system32_cmd exe - python  screenshot py

from steam-screenshot-backup-tool.

Alsweider avatar Alsweider commented on June 26, 2024

Now the process has stopped at 811 of 4547. Here the log:

Download screenshot: 811 of 4547
Traceback (most recent call last):
  File "screenshot.py", line 96, in <module>
    start()
  File "screenshot.py", line 19, in start
    pageGrab(uInput, 1)
  File "screenshot.py", line 94, in pageGrab
    return pageGrab(url, n + 1, magicalNumber)
  File "screenshot.py", line 94, in pageGrab
    return pageGrab(url, n + 1, magicalNumber)
  File "screenshot.py", line 94, in pageGrab
    return pageGrab(url, n + 1, magicalNumber)
  [Previous line repeated 114 more times]
  File "screenshot.py", line 91, in pageGrab
    set_desc(fileDir, item['description'])
  File "screenshot.py", line 41, in set_desc
    exif_bytes = piexif.dump(exif_dict)
  File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\piexif\_dump.py", line 63, in dump
    zeroth_set = _dict_to_bytes(zeroth_ifd, "0th", 0)
  File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\piexif\_dump.py", line 337, in _dict_to_bytes
    offset)
  File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\piexif\_dump.py", line 197, in _value_to_bytes
    four_bytes_over = _pack_byte(*raw_value)
  File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\piexif\_dump.py", line 162, in _pack_byte
    return struct.pack("B" * len(args), *args)
struct.error: ubyte format requires 0 <= number <= 255

from steam-screenshot-backup-tool.

Salies avatar Salies commented on June 26, 2024

@Alsweider 1 - send me your data.json.
Btw, you can know which screenshots are being detected by looking at that file. See if you last and your first screenshots were detected.

from steam-screenshot-backup-tool.

Salies avatar Salies commented on June 26, 2024

oh, and don't be afraid of running the program twice - it doesn't re-download screenshots that are already there.

from steam-screenshot-backup-tool.

Alsweider avatar Alsweider commented on June 26, 2024

data.zip

I tried downloading again and at the first try it found only 50 pictures, then it detected 5850 of 5913 screenshots, but the process went only up to 495 downloads until the same error occured:

Download screenshot: 494 of 5850
Download screenshot: 495 of 5850
Traceback (most recent call last):
  File "screenshot.py", line 96, in <module>
    start()
  File "screenshot.py", line 19, in start
    pageGrab(uInput, 1)
  File "screenshot.py", line 94, in pageGrab
    return pageGrab(url, n + 1, magicalNumber)
  File "screenshot.py", line 94, in pageGrab
    return pageGrab(url, n + 1, magicalNumber)
  File "screenshot.py", line 94, in pageGrab
    return pageGrab(url, n + 1, magicalNumber)
  [Previous line repeated 114 more times]
  File "screenshot.py", line 91, in pageGrab
    set_desc(fileDir, item['description'])
  File "screenshot.py", line 41, in set_desc
    exif_bytes = piexif.dump(exif_dict)
  File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\piexif\_dump.py", line 63, in dump
    zeroth_set = _dict_to_bytes(zeroth_ifd, "0th", 0)
  File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\piexif\_dump.py", line 337, in _dict_to_bytes
    offset)
  File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\piexif\_dump.py", line 197, in _value_to_bytes
    four_bytes_over = _pack_byte(*raw_value)
  File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\piexif\_dump.py", line 162, in _pack_byte
    return struct.pack("B" * len(args), *args)
struct.error: ubyte format requires 0 <= number <= 255

I'm just guessing, but the problem might be that I'm using a different setup (Windows, Python, different version?), or it may be just a network connection or server error which leads to abortion. Sometimes the screenshots on Steam don't show up and the page shows only an empty gallery.

from steam-screenshot-backup-tool.

Salies avatar Salies commented on June 26, 2024

App recreated, tested with 1728 screenshots (my personal).

from steam-screenshot-backup-tool.

Salies avatar Salies commented on June 26, 2024

btw @Alsweider app finally remade! try it again with your stuff.

from steam-screenshot-backup-tool.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.