UnicodeWarning in Seasonal Water Yield Model

E0008806E0008806 Member
edited December 2018 in Freshwater Models
Dear NatCap team,

I have encountered this error while running the Seasonal water yield model - "Unicode Warning encountered: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as unequal"

I have attached the log as well.

I have ensured the following based on some of the answers given in previous discussions in the forum
1. All the rasters and the watershed layer are projected to WGS_1984_World_Mercator.
2. All lucodes are correct (i.e. lucodes in land use layer match those of biophysical table)
3. ET and Precipitation files only contain the tifs (.tfw files and other files were removed)
4. Version I am using is 3.5.0
5. csvs - headers follows the ones given in the sample data

Can you kindly advise on what I can do please? Thank you very much!

Sincerely,
Theo
Post edited by E0008806 on

Comments

  • jdouglassjdouglass Administrator, NatCap Staff
    Neat error!  The issue appears to be in your rain events table.  Could you attach the rain events table here so we can take a look?
  • Dear jdouglass,

    Thank you for your reply! It appears I can't upload the csv here. This is how it looks like when the csv file is opened using textEdit on mac!

    month,events
    1,26
    2,20
    3,4
    4,5
    5,16
    6,18
    7,18
    8,19
    9,14
    10,15
    11,23
    12,24

    Many thanks in advance!

    Theo
  • jdouglassjdouglass Administrator, NatCap Staff
    Well, I don't see anything immediately.  Could you email me (jdouglass@stanford.edu) your table so I can take a look at the original?
  • Dear @jdouglass,

    I have just sent you an email with the file!

    Thank you so much for your time!

    Theo
  • jdouglassjdouglass Administrator, NatCap Staff
    Hi Theo, I just responded over email as well, but I'll write the same thing here for posterity.  I don't see anything wrong with the table itself, and I think we might have incidentally fixed the issue along with some of the other work we've done on InVEST since version 3.5.0.  Before we dig into the issue some more, could you check to see if this latest development version of InVEST (download here: http://data.naturalcapitalproject.org/invest-releases/3.5.0.post731+h79f6dc66514b/InVEST_3.5.0.post731+h79f6dc66514b_x86_Setup.exe) fixes the issue?

    Thanks!
    James
  • Dear James,

    Thank you for your email and reply! The setup link in your message appears to be not compatible with mac os, can I kindly ask if you have the mac version of the setup please? Or is this already available at the download page (https://naturalcapitalproject.stanford.edu/invest/)?

    Thank you very much!

    Regards,
    Theo
  • jdouglassjdouglass Administrator, NatCap Staff
    edited December 2018
    Post edited by jdouglass on
  • Dear James,

    Thank you for the link! I reinstalled the software, but the same error occurs! I have attached the log as well!

    Regards,
    Theo
  • jdouglassjdouglass Administrator, NatCap Staff
    Hi Theo, thanks for this.  The error seems to be happening from the biophysical table now, (Biophysicaltable_2010.csv).  Could you send that table as well?  Thanks!
    James
  • Hi James!

    I have sent you an email with the biophysical table attached!

    Thank you! and Merry Christmas :)

    Theo
  • Dear James and everyone,

    I used the sample data csvs and changed the values for my study! This worked out for me! I guess it just had trouble reading the csv files that i created on my mac!

    Thank you anyway!

    Regards,
    Theo
  • jdouglassjdouglass Administrator, NatCap Staff
    Hi Theo, after digging into this a bit more, there is definitely an issue with how InVEST is parsing UTF-8 CSV files.  The workaround is to save the file as CSV (not CSV UTF-8) in Excel.

    In any case, I'm glad you were able to get things to work by editing the sample data CSVs!
This discussion has been closed.