Scenario Generator Error: "unsupported operand type(s) for /: 'unicode' and 'float'"

Hi,

Recently I have been trying to use the Scenario Generator, but every time I have run into the error, "TypeError encountered: unsupported operand type(s) for /: 'unicode' and 'float'". (A picture of the error as it appeared in the log is attached to this post.) I have been using the Scenario Generator before without trouble-- the difference between the earlier times and this time is that I am using a larger map. The map I was using previously was an area that is contained in the new, larger map that I am using. I have been looking through the csv Transition Table file that I'm using, trying to fix this error, but so far nothing has worked. I have also looked in the NatCap Forums for earlier posts with the same issue, but I haven't found a solution in these either. Attached to this post are pictures of the error screen and my .csv transition table. If anyone could help me fix the error I've been encountering, I would greatly appreciate it.

Thank you,
Andie
1366 x 768 - 192K
708 x 537 - 103K

Comments

  • jdouglassjdouglass Administrator, NatCap Staff
    Hi @areidy,  could you attach the logfile from your model run so we can take a look at where the tool failed?
    Thanks!
    James
  • Got this error, can you help me please?
    774 x 583 - 145K
  • jdouglassjdouglass Administrator, NatCap Staff
    Hi @jorigel, the error message says that the table LCTT4.csv is missing an ID column.  The InVEST User's Guide has more information about the expected format for these tables that you might find useful.  Here's the link: http://data.naturalcapitalproject.org/nightly-build/invest-users-guide/html/scenario_generator.html#data-needs

    Hope this helps!
    James
  • Hi jdouglass,

    Here is the logfile from the model run!

    Thank you,
    Andie

  • jdouglassjdouglass Administrator, NatCap Staff
    Hi Andie,  thanks for this, and sorry about the delay!

    Ok, so it looks like the issue here is the 'patch ha' field.  The User's Guide chapter on the Rule-Based Scenario Generator says that the field is optional, but based on the error in your logfile, I'm guessing that the column is still defined, just with at least one blank field.  Does make sense given what's in your transition table?

    If it does (and until we can fix this issue), could you make sure that all of the fields in that column have a value and let us know if it doesn't resolve the issue?

    Thanks!
    James
Sign In or Register to comment.