Emersont1 / itchio

https://pypi.org/project/itchiodl/
MIT License
105 stars 17 forks source link

Finding games but not writing files. #70

Closed mscout1 closed 1 year ago

mscout1 commented 1 year ago

When I run this it lists a huge list of files and creates a ton of directories. But there are no files written to any of those directories. Any idea why?

kururuchan commented 1 year ago

I can confirm this issue as well. I've run the program as both admin, and not as admin, using CMD and Python on a Windows 10 machine. It also does not create any form of error file.

Emersont1 commented 1 year ago

Duplicate of #69. Closing and consolidating

Emersont1 commented 1 year ago

This was an issue with older versions, are you sure you're running 2.2.0?

mscout1 commented 1 year ago

I'm running what pip brought me, and yep that's 2.2.0.

DebugDax commented 1 year ago

Adding to this, encountering the same issue on 2.2.0 with Python 3.10.5 on Windows 10.

Running with: python -m itchiodl.downloader --api-key=XXX --platform=windows --jobs=4 or without --api-key and authenticating with plaintext.

Creates subfolders for every item but each folder is empty.

--

EDIT: This seems to work on linux though. I ran the same command as above on Debian 4.19 with Python 3.8.16, and it downloads files into the subfolders as expected.

mscout1 commented 1 year ago

Hi,

My ADHD decided I am hyper focusing on this fight now.

The key hitch seems to be in itchiodl.utils.clean_path. The re module does not have a replace function. You probably meant re.sub. This raises an AttributeException

The secondary problem was that you never consume generator returned from ThreadPoolExecutor.map The results in all the exceptions being swallowed silently.

Once I fixed those, I started running into other exceptions caused by inconsistent handling of file and path names. I am working on those.

I hope to have a PR tomorrow. If you don't see one by friday, assume I got board and wandered off.

Emersont1 commented 1 year ago

The issue is line97 game.py. I think this should be upgraded to use pathlib, but i can't write the fix until tomorrow

Emersont1 commented 1 year ago

Fixed by #72