CIRAIG/OpenIO-Canada

Getting error when endogenizing_capitals=True with 2017 run only, 2018 and 2019 works fine.

Closed this issue · 4 comments

2023-10-26 09:21:52,776 - openIO-Canada - INFO - Endogenizing capitals of OpenIO-Canada...
There is an issue while allocating capital formation of openIO-Canada for the capital: Machinery manufacturing and for the province: NT
There is an issue while allocating capital formation of openIO-Canada for the capital: Beverage and tobacco product manufacturing and for the province: NU
There is an issue while allocating capital formation of openIO-Canada for the capital: Animal production and for the province: NU
There is an issue while allocating capital formation of openIO-Canada for the capital: Beverage and tobacco product manufacturing and for the province: NU
2023-10-26 09:23:54,740 - openIO-Canada - INFO - Balancing inter-provincial trade...
2023-10-26 09:25:51,280 - openIO-Canada - INFO - Pre-treatment of international trade data...
Traceback (most recent call last):
File "F:\carbon\EEMRIO_2017.py", line 10, in
tables = openIO.IOTables(folder_path='F://carbon/2017/Detail level/',
File "F:\carbon\openIO.py", line 172, in init
self.determine_sectors_importing()
File "F:\carbon\openIO.py", line 810, in determine_sectors_importing
assert len(self.U[self.U < -1].dropna(how='all', axis=1).dropna(how='all', axis=0)) == 0
AssertionError

Looks like the import data does not match with the supply and use data for some sectors in northwest territories and nunavut. Basically the import data says these provinces import more than what they declare using in the supply and use table.
I'll remove the AssertionError and force negative values to zero so that it works, but I'll still print a warning message describing this issue. So jeep in mind that data for these small territories might be scuffed.

Hi Max can you please tell me in more detail where I have to make changes.

I already made the necessary changes in the last commit.

oh sorry i didnt notice. thanks