Loading error when following the demo
Closed this issue · 10 comments
Following the demo (https://github.com/CIRAIG/OpenIO-Canada/blob/master/doc/demo.ipynb)
Getting the following error at the 'Endogenizing capitals' stage:
If I disable endogenizing capitals and run again, I get a similar error at the 'Balancing interprovincial trade' stage:
I am using the recommended pandas version (1.3.4), so this is not a duplicate of #21.
Here is the full library version list:
Using numpy 1.21.0 instead of 1.20.3, because it crashes with 1.20.3 (matplotlib requires >1.21.0).
This is with the 2019 datasets, copying the demo.
Hi!. Code seems to be running fine on numpy 1.21.0, so it must not be the root of the issue. I'll keep looking into it.
I think the problem would probably come from the Python version you have installed? I can't see it in your package list. But I see you have matplotlib 3.8.3, which does not work with Python 3.9 I believe.
Can you try to downgrade Python to 3.9.7 and so matplotlib to whatever version that works with that Python distribution? And then tell me if it solves the issue or not.
Hi! Thanks for looking into this.
I've tested again with matplotlib on an older version (3.7.0) and numpy changed to the recommended version (1.20.3), still on Python 3.9.7:
And I get the same error as before:
By the way, matplotlib 3.8.3 does support Python 3.9.X:
(taken from: https://matplotlib.org/devdocs/devel/min_dep_policy.html)
Could it be an issue with the Statcan/Exiobase datasets?
I used the 2019 versions, copying the demo, but I have the same issue with the 2022 and 2020 versions.
Specifically, I used these files:
https://www150.statcan.gc.ca/n1/pub/15-602-x/15-602-x2017001-eng.htm
These are the correct files.
Are you using the latest version of openIO-Canada?
Are you using the latest version of openIO-Canada?
Yes, the latest commit.
Could you try with the 2.8 release? Maybe I broke something on some machines with the latest commit.
If it's still does not work with the 2.8 release we could have a call if you want to look into it live.
Just tried the 2.8 release; same issue.
I think I found the cause of the issue.
Turns out it only works if you use forward slashes in the filepath for the folder_path param. I was using backslashed file-paths (system default on Windows using os.sep and os.path functions); switching to forward slashes fixed it.
See: https://github.com/CIRAIG/OpenIO-Canada/blob/master/openIO.py#L56
Perfect. Thanks for the modification :)