Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exio3 parser permission error #35

Closed
MaximeAgez opened this issue Nov 15, 2018 · 7 comments
Closed

Exio3 parser permission error #35

MaximeAgez opened this issue Nov 15, 2018 · 7 comments

Comments

@MaximeAgez
Copy link

Hi,
I am trying to use the parser of exiobase3 and I get a permission error. It seems that the parser only accepts zip files? Yet, when I use the zip file directly downloaded from exiobase website it tells me KeyError: "There is no item named 'mrIot3.0.txt' in the archive", and when i use the unzipped file i get the following error:

io = pymrio.parse_exiobase3('C://Users/Maxime/Desktop/Thesis/Bdd/IOT_2011_pxp/')

PermissionError Traceback (most recent call last)
in ()
----> 1 io = pymrio.parse_exiobase3('C://Users/Maxime/Desktop/Thesis/Bdd/IOT_2011_pxp/')

C://Users/Maxime/Desktop/Thesis/Modules_Python/pymrio-master\pymrio\tools\ioparser.py in parse_exiobase3(zip_file, path_in_zip, version, iosystem, year, charact)
498 # read the data into a dicts as pandas.DataFrame
499 logging.info('Read exiobase3 from {}'.format(zip_file))
--> 500 zip_file = zipfile.ZipFile(zip_file)
501
502 core_data = {exio_table: pd.read_table(

C:\Users\Maxime\Anaconda3\lib\zipfile.py in init(self, file, mode, compression, allowZip64)
1088 while True:
1089 try:
-> 1090 self.fp = io.open(file, filemode)
1091 except OSError:
1092 if filemode in modeDict:

PermissionError: [Errno 13] Permission denied: 'C:\Users\Maxime\Desktop\Thesis\Bdd\IOT_2011_pxp'

@konstantinstadler
Copy link
Member

Hi, I can not reproduce the bug. Are you using the latest publicly available exiobase version: you should have a exio34.ini file in the extracted directory.

@MaximeAgez
Copy link
Author

MaximeAgez commented Nov 29, 2018 via email

@konstantinstadler
Copy link
Member

konstantinstadler commented Nov 29, 2018

Hi,

can you do

import pymrio
import sys
print("Python :{}, pandas: {}, pymrio: {}".format(sys.version_info, pymrio.pd.__version__, pymrio.__version__))

and send me the output.

@MaximeAgez
Copy link
Author

MaximeAgez commented Dec 5, 2018 via email

@konstantinstadler
Copy link
Member

There is your problem: you are far behind the current release. Current pymrio version: 0.3.8 - you use 0.2.2. Run

pip install pymrio --upgrade

This should solve your problem. Anyway, please let me know if it worked.

@MaximeAgez
Copy link
Author

MaximeAgez commented Dec 6, 2018 via email

@konstantinstadler
Copy link
Member

No problem. Happy to help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants