makhidkarun / traveller_pyroute

Traveller trade route generator
MIT License
14 stars 5 forks source link

Sector file download broken #8

Closed CyberiaResurrection closed 5 years ago

CyberiaResurrection commented 5 years ago

When I try to use downloadsec.py as outlined in RunSuite, I get:

[alex@localhost traveller_pyroute]$ python PyRoute/downloadsec.py --routes sectorlist.txt  ../sectors
Downloading Afawahisa
Traceback (most recent call last):
  File "PyRoute/downloadsec.py", line 52, in <module>
    get_url (url, sector, 'sec')
  File "PyRoute/downloadsec.py", line 29, in get_url
    with codecs.open(path, 'wb', 'utf-8') as out:
  File "/usr/lib64/python2.7/codecs.py", line 898, in open
    file = __builtin__.open(filename, mode, buffering)
IOError: [Errno 2] No such file or directory: u'../sectors/Afawahisa.sec'
tjoneslo commented 5 years ago

Does the ..\sectors directory exist?

CyberiaResurrection commented 5 years ago

Yes - I flattened and re-created it before running again, and I got the exact same result.

CyberiaResurrection commented 5 years ago

Running the same command under a debugger clears the problem, but that's not particularly sustainable long-term.

tjoneslo commented 5 years ago

The reason for the IOError: [Errno 2] No such file or directory error is the directory ../sectors does not exist. Given that is a relative path, it may not be in the place you expect.

CyberiaResurrection commented 5 years ago

Weird - the ../sectors directory definitely does exist, using ../PyRoute as working directory. Route calculation references ../sectors and ../maps without missing a beat.

CyberiaResurrection commented 5 years ago

Heck with it, it will be a pain to remember to use the debugger, but it's a workaround. Closing.