HRA Preprocessor - UnboundLocalError

Hi there,

I would like some help regarding an error please:

04/09/2018 10:57:52  natcap.invest.ui.usage ERROR    Error when transforming coordinates: local variable 'spatial_ref' referenced before assignment
Traceback (most recent call last):
  File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\ui\usage.py", line 176, in _merge_local_bounding_boxes
UnboundLocalError: local variable 'spatial_ref' referenced before assignment



I am running Invest 3.4.4 on "Windows Server 2012 R2", and I am using the sample data sets that were provided by this version's download.

I have attached two logs:

the standard message log:
InVEST-Habitat-Risk-Assessment-Preprocessor-log-2018-04-09--10_57_52.txt
the window log message:
InVEST-Habitat-Risk-Assessment-Preprocessor-err-2018-04-09--10_57_52.txt

I have just started to look into this software. However, before I can use my own data, I wish to understand the processing by using the sample data. 

Is anybody able to help me solve the error please?

Cheers,
loewenthal

image

Comments

  • DaveDave Member, NatCap Staff
    This is interesting. I'm seeing the same message in another model. So this error isn't coming from the HRA Preprocessor, but rather from the general InVEST user interface code. And the end of your log indicates that the model completed successfully after all. When you look in your output workspace, do you find the expected results? There should be a directory in your selected workspace called "habitat_stressor_ratings".


  • Hi Dave,

    Thanks for your advice.

    I have since run the following HRA model itself and again got the error. Moreove, since you have found this error with other models, perhaps this is a more generic error.

    However, after running both the HRA preprocessor and the HRA model with the sample datasets, it seems that the outputs are as expected. So, I presume that the error has not effected the outputs.

    In conclusion, when I run the models on my datasets, I will just have to be extra mindful with regards to this potentail issue.

    Hopefully, you all at NapCap are able to solve the issues in future software version releases.

    Thanks,
    Loewenthal



  • RichRich Administrator, NatCap Staff
    HI, FYI, @Dave is right, this is an internal UI error that's only logging the error, not otherwise interrupting the flow of the model. I would expect that your result is otherwise correct so long as the model completed. And FYI, @jdouglass is working on a fix that'll go out in the next version of InVEST.
  • Hi Rich, Thanks very much for the update on this error. Great to that @jdouglass is working on it.
Sign In or Register to comment.