-
Notifications
You must be signed in to change notification settings - Fork 5
Loading a default schema fails on Windows 10 with Python 3.7 #328
Comments
I think you are right that this is due to filepaths. Specifically, I think it’s because resources are all loaded via relative filepaths: Lines 28 to 31 in 269a2c1
I think best practice in packages is to use absolute filepaths everywhere. I guess that’s the problem here. |
Oddly enough it works just fine on my Ubuntu partition and doesn't try and access |
Yes, same. I think using relative paths in this way is dodgy, because it’s not always obvious what it is relative to. That’s why package developers usually do something like: basepath = os.path.dirname(os.path.abspath(__file__)) …and then prepend that to all relative paths. |
Aside: contrary to what the usage section in the README says, this library is not currently under active development. See this announcement on IATI discuss: https://discuss.iatistandard.org/t/state-of-pyiati/1360/7 |
Found a fix, in case this project is ever rebooted. On line 99 here, Line 99 in 269a2c1
For some reason, the default Python package resource manager
|
It’s not currently. Travis says:
|
Here's my full error trace.
Should be reproducible with just the code in the README:
Seems to be an issue with absolute filepaths?
The text was updated successfully, but these errors were encountered: