Pollination Error: line contains NULL byte


I have been trying to run the Crop Pollination model for a while now and it always sends me back the same message. I tried to check every thing I could possibly think of might be causing the problem (raster format, tables format, tables columns names…) but any of it had change the error message a bit. As every one of the log files it’s the same I will copy the latest log file:

2019-12-17 12:45:56,272 utils.prepare_workspace(109) INFO Writing log messages to C:\Users\IRATI PROYECTOS\Documents\pollination_workspace\InVEST-Crop-Pollination-log-2019-12-17–12_45_56.txt
2019-12-17 12:45:56,278 model._logged_target(1633) Level 100 Starting model with parameters:
Arguments for InVEST natcap.invest.pollination 3.7.0:
guild_table_path Z:/0_PAISAJISMO/I+D/IVSE-MajadaHonda/Polinizacion/C_Tabla_polinizadores.xls
landcover_biophysical_table_path Z:/0_PAISAJISMO/I+D/IVSE-MajadaHonda/Polinizacion/C_Atributos_UAmb.xls
landcover_raster_path Z:/0_PAISAJISMO/I+D/IVSE-MajadaHonda/Polinizacion/U_lulc.ovr
n_workers -1
results_suffix actual
workspace_dir C:\Users\IRATI PROYECTOS\Documents\pollination_workspace

2019-12-17 12:45:56,371 model._logged_target(1639) ERROR Exception while executing <function execute at 0x160C5CF0>
Traceback (most recent call last):
File “Z:\opt\atlassian\pipelines\agent\build\env\lib\site-packages\natcap\invest\ui\model.py”, line 1636, in _logged_target
File “Z:\opt\atlassian\pipelines\agent\build\env\lib\site-packages\natcap\invest\pollination.py”, line 226, in execute
File “Z:\opt\atlassian\pipelines\agent\build\env\lib\site-packages\natcap\invest\pollination.py”, line 876, in _parse_scenario_variables
File “Z:\opt\atlassian\pipelines\agent\build\env\lib\site-packages\natcap\invest\utils.py”, line 452, in build_lookup_from_csv
File “Z:\opt\atlassian\pipelines\agent\build\env\lib\site-packages\pandas\io\parsers.py”, line 702, in parser_f
File “Z:\opt\atlassian\pipelines\agent\build\env\lib\site-packages\pandas\io\parsers.py”, line 429, in _read
File “Z:\opt\atlassian\pipelines\agent\build\env\lib\site-packages\pandas\io\parsers.py”, line 895, in init
File “Z:\opt\atlassian\pipelines\agent\build\env\lib\site-packages\pandas\io\parsers.py”, line 1132, in _make_engine
File “Z:\opt\atlassian\pipelines\agent\build\env\lib\site-packages\pandas\io\parsers.py”, line 2230, in init
File “Z:\opt\atlassian\pipelines\agent\build\env\lib\site-packages\pandas\io\parsers.py”, line 2361, in _make_reader
Error: line contains NULL byte
2019-12-17 12:45:56,385 model._logged_target(1642) INFO Execution finished
2019-12-17 12:45:56,391 utils.prepare_workspace(115) INFO Elapsed time: 0.12s

I hope someone can help me figure out what’s wrong.
Thank you. ¡Have a nice day!

Thanks for posting. It looks like you are providing Excel files for the tables. I don’t think that format is supported for this model http://releases.naturalcapitalproject.org/invest-userguide/latest/croppollination.html#data-needs

Could you try saving them as CSV, and then open them in a plain text editor to look for any strange formatting, such as blank lines?

Thanks for your reply Dave. I’m going to try to provide the data as you suggested.
Anyway, I’m a bit confuse because the InVEST User’s Guide I was following said excel files were supported. Am I reading the wrong User’s Guide? How can I know?

This is the link of the User’s Guide I was following:


That is confusing! In the guide I linked, you can see the header at the top of the page indicates the InVEST version that it corresponds with, in this case the very latest development version (3.7+). The guide you linked is an outdated version, though that version number is missing, so that’s not easy to figure out.

You can always find a link to the latest User’s Guide from our website: https://naturalcapitalproject.stanford.edu/software/invest

And you can always find the exact version that goes with your installation of InVEST in the “documentation” folder in your local InVEST installation.

Thank you very much for your assistance!
Model is running and looks like it’s going to come out jus fine.

I found the issue with the User’s Guide link. When you are at the InVEST Software Platform > InVest page, the InVEST User’s Guide (online) link that is on the left takes you to the latest version.
But, if you go to InVEST Software Platform > Software Support and Resources page, the InVest User’s Guide link that is on top of the list of resources takes you to this outdated-not specified version.

Maybe that’s an error or, if it isn’t, maybe it should warn that it isn’t specific for any version and where you could check if your User’s Guide version it’s right for your InVEST version, just as you very kindly indicated me.

Thank you again. Hope you have a beautiful day!

1 Like

Thanks for reporting that, we’ll get that old link updated!

1 Like