poppu-mtg / StackIt

Python script generating a column-shaped TCG decklist based on cropped captions of each card's art.
MIT License
14 stars 6 forks source link

os.rename error on #73

Closed JeffHoogland closed 6 years ago

JeffHoogland commented 6 years ago

Ubuntu 16.04 with python2

Traceback (most recent call last): File "StackIt.py", line 34, in builder.main(sys.argv[1]) File "/media/Storage/GitHub/StackIt/StackIt/builder.py", line 440, in main lookupScan = scraper.download_scanHexCM(cmdr.name, guid, typeCM) File "/media/Storage/GitHub/StackIt/StackIt/scraper.py", line 95, in download_scanHexCM os.rename(localname, lookupScan) OSError: [Errno 18] Invalid cross-device link

JeffHoogland commented 6 years ago

Replacing all instances of os.rename with shutil.move (and importing shutil) seems to resolve the issue here.

silasary commented 6 years ago

Are you running StackIt off of an external disk?

JeffHoogland commented 6 years ago

It shouldn't matter what it is running on, but no, in this case it is running on a hard drive formatted as ext4

bakert commented 6 years ago

This fix is in #76