I have been working on QGIS 3.10, I am using DEMs files that come originally from Lidar data, so they are large files with high resolution. I have been trying to create contours using the: Raster, Extraction, contour option. The problem is that my laptop crashes when I change the default elevation from 10 to 2. I originally thought that the problem could be related to memory. However, I upgraded the RAM memory and internal memory of my computer and it still crashes. The last time it went pretty bad and a blue screen appeared. I turn off my laptop and this error message appear after I turned on the laptop and I restarted Qgis:

ValueError: embedded null byte

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "", line 1, in 
  File "C:/PROGRA~1/QGIS 3.10/apps/qgis-ltr/./python\qgis\utils.py", line 42, in 
    import time
SystemError:  returned a result with an error set

Python version:
3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]

QGIS version:
3.10.7-A Coruña 'A Coruña', 7b4ca4c8d0

Python path:
['C:/PROGRA~1/QGIS 3.10/apps/qgis-ltr/./python', 'C:/Users/Gaby/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python', 'C:/Users/Gaby/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins', 'C:/PROGRA~1/QGIS 3.10/apps/qgis-ltr/./python/plugins', 'C:\\PROGRA~1\\QGIS 3.10\\apps\\Python37', 'C:\\PROGRA~1\\QGIS 3.10\\apps\\Python37\\Scripts', 'C:\\Program Files\\QGIS 3.10\\bin\\python37.zip', 'C:\\PROGRA~1\\QGIS 3.10\\apps\\Python37\\DLLs', 'C:\\PROGRA~1\\QGIS 3.10\\apps\\Python37\\lib', 'C:\\Program Files\\QGIS 3.10\\bin', 'C:\\PROGRA~1\\QGIS 3.10\\apps\\Python37\\lib\\site-packages', 'C:\\PROGRA~1\\QGIS 3.10\\apps\\Python37\\lib\\site-packages\\win32', 'C:\\PROGRA~1\\QGIS 3.10\\apps\\Python37\\lib\\site-packages\\win32\\lib', 'C:\\PROGRA~1\\QGIS 3.10\\apps\\Python37\\lib\\site-packages\\Pythonwin'] `

I also kept in my laptop the older and more stable version of QGIS 2.18 and I extracted contours of the same file....No problem at all.

Does anyone have had a similar problem regarding extracting contours?

  • Give us a sense of the scope of the task: How large an area, and what resolution is the raster data? – Bjorn Jul 2 '20 at 14:53

Sounds similar to:


Which is a Python3 issue, which would explain why QGIS 2.18 would not have the issue (It uses Python 2.7).

I would raise this as a bug report on:


But there is likely something else going, on as the answers suggest that it is a file name issue, not a file issue.

You could try removing any spaces from the filename.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.