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

Misleading error message for parse_eurostat #2

Closed
maximikos opened this issue Nov 8, 2021 · 4 comments
Closed

Misleading error message for parse_eurostat #2

maximikos opened this issue Nov 8, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@maximikos
Copy link

Following the documentation for the Eurostat-parsing functionality, I ran into below error ("non-corresponding years"). This is unexpected since I was strictly following the documentation, i.e. did everything as described there. Any ideas why that happens and how to get my SUTs?

`---------------------------------------------------------------------------
WrongInput Traceback (most recent call last)
c:\Users\maximiko\IO-testbed\Eurostat_MARIO.py in
----> 18 italy_sut = parse_eurostat(
19 supply_path = supply_path,
20 use_path = use_path,
21 region = "Italy",
22 year = 2011

~\Anaconda3\envs\pymrio\lib\site-packages\mario\tools\parsersclass.py in parse_eurostat(supply_path, use_path, region, year, consumption_categories, factors_of_production, imports, model, name, calc_all, **kwargs)
432 table = "SUT"
433 if table == "SUT":
--> 434 matrices, indeces, units = eurostat_sut(
435 supply_path,
436 use_path,

~\Anaconda3\envs\pymrio\lib\site-packages\mario\tools\tableparser.py in eurostat_sut(supply_path, use_path, region, selected_year, consumption_categories, factors_of_production, imports)
992 years = supply_years
993 else:
--> 994 raise WrongInput("No correspondance between years of use and supply tables")
995
996 "Warning on supply in IxP format, Use in PxI format"

WrongInput: No correspondance between years of use and supply tables`

@mohammadamint
Copy link
Collaborator

mohammadamint commented Nov 9, 2021

Dear @maximikos this error should happen when the giver year does not correspond to the table you downloaded from Eurostat. but there is the possibility that the error is not handled correctly due to the structure of the database downloaded.
would you please send your database then I can check and we may improve the error message to be more clear?

@LorenzoRinaldi
Copy link
Collaborator

Dear @maximikos I tested the function and it works if you download tables in M€ only (so selecting just one unit of measure). We will improve the example provided on the documentation and certainly we will also work on making the eurostat parser more general and flexible to different table formats. In case you face the same issue, please send your database we will test it together with @mohammadamint.

@LorenzoRinaldi LorenzoRinaldi added the enhancement New feature or request label Nov 10, 2021
@maximikos
Copy link
Author

maximikos commented Nov 12, 2021 via email

@mohammadamint
Copy link
Collaborator

@maximikos there are a couple of small issues with the validation of the database format from Eurostat. we are fixing the issues and the new version will be uploaded very soon. AS we just published the first release there are minor issues with some of the functions and we are fixing them. Unfortunately, I can't find the attached file. Would you please send it by email? so we can spot the error. Moreover, you can also reshape your database to the acceptable excel format for mario.
Looking forward to your email!!

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

No branches or pull requests

3 participants