Page MenuHome

DXF import does not start when there is a scene georeferencing
Open, Needs Triage by DeveloperPublic


System Information
Operating system: Ubuntu 18.04
Graphics card: GeForce GTX TITAN X (GM200)

Blender Version
Broken: 2.80, e6eb7b9ccee1, 2019-03-11 23:54

DXF importer fails to start when I have a georeferencing in the scene.

Exact steps for others to reproduce the error
I have there a georeferencing created by BlenderGIS addon. My exact steps were:

  • import a SHP file with BlenderGIS - this creates the georeferencing
  • try to start DXF importer. I fails with following error:
Traceback (most recent call last):
  File "/opt/blender/blender-2.80-e6eb7b9ccee1-linux-glibc224-x86_64/2.80/scripts/addons/io_import_dxf/", line 550, in invoke
  File "/opt/blender/blender-2.80-e6eb7b9ccee1-linux-glibc224-x86_64/2.80/scripts/addons/io_import_dxf/", line 322, in _update_use_georeferencing
    _update_use_georeferencing_do(self, context)
  File "/opt/blender/blender-2.80-e6eb7b9ccee1-linux-glibc224-x86_64/2.80/scripts/addons/io_import_dxf/", line 154, in _update_use_georeferencing_do
    self.proj_scene = 'USER'
  File "/opt/blender/blender-2.80-e6eb7b9ccee1-linux-glibc224-x86_64/2.80/scripts/modules/", line 665, in __setattr__
    return setattr(properties, attr, value)
TypeError: bpy_struct: item.attr = val: enum "USER" not found in ('NONE', 'TMERC')

When I try to run it in a fresh scene without any georeferencing, it works.



Event Timeline

Philipp Oeser (lichtwerk) triaged this task as Needs Information from User priority.Mar 12 2019, 3:03 PM

Not sure about the exact workflow, I assume we are talking about
(This addon is not maintained by blender...)

However, if you could provide a .blend file with georeferencing included, we might have a look...
(exact steps in regards to "try to start DXF importer" would help here)

Otherwise report the error over here

Yes, that BlenderGIS.

As for reproducibility of the problem, simply open provided file and try to run DXF import (File / Import / AutoCAD DXF). Assuming you have that addon enabled, of course.

Bastien Montagne (mont29) raised the priority of this task from Needs Information from User to Needs Triage by Developer.

My bet would be that your blender setup does not have access to pyproj, DXF code is probably wrong in that case? At least it seems to have a very limited set of projections defined when it cannot find that python module…

I have just tried to install python3-pyproj (wasn't in my system before - you are right), but no luck. Perhaps Blender is unable to reach it? I have a version downloaded as tarball from, simply extracted.

yes, blender archives from our download site are 'self contained', they (nearly) use no system library, so installing python pyproj on your system won't help. What you can try is copying the module files installed by that package into your blender app directory (path should be something like /path/to/blenderdir/2.80/python/lib/python3.7/), if they are pure python (with no compiled .lib binaries).

you could also try getting it through pip

/path/to/blenderdir/2.80/python/bin/python -m ensurepip --default-pip
/path/to/blenderdir/2.80/python/bin/python -m pip install pyproj

with pyproj installed (through pip) I can open dxf_import_problem.blend and start the DXF import, however - workflowwise - I am unsure what to do next? I need to select a SRID, which one?

So one step further but not perfect. Bastien was right, with pyproj installed (by pip, but it doesn't matter) I can start dxf import.

But it immediatelly complains that "proj_create: crs not found". I have tried to select "Czech republic & Slovakia", it still complains everytime I put my mouse over dxf import panel. And when I try to start import, I get this:

Traceback (most recent call last):
  File "/opt/blender/blender-2.80-e6eb7b9ccee1-linux-glibc224-x86_64/2.80/scripts/addons/io_import_dxf/", line 525, in execute
    proj_scn = Proj(init=self.epsg_scene_user)
  File "/opt/blender/blender-2.80-e6eb7b9ccee1-linux-glibc224-x86_64/2.80/python/lib/python3.7/site-packages/pyproj/", line 295, in __init__ = CRS.from_user_input(projparams if projparams is not None else kwargs)
  File "/opt/blender/blender-2.80-e6eb7b9ccee1-linux-glibc224-x86_64/2.80/python/lib/python3.7/site-packages/pyproj/", line 224, in from_user_input
    return cls(**value)
  File "/opt/blender/blender-2.80-e6eb7b9ccee1-linux-glibc224-x86_64/2.80/python/lib/python3.7/site-packages/pyproj/", line 146, in __init__
    super(CRS, self).__init__(projstring)
  File "pyproj/_crs.pyx", line 322, in pyproj._crs._CRS.__init__
pyproj.exceptions.CRSError: Invalid projection: +init=epsg:102067 +type=crs

It would be nice, if it was able to get CRS and geoloc defined by BlenderGIS, they are stored as custom scene properties.