Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: float() argument must be a string or a number #45

Open
pigreco opened this issue Nov 21, 2017 · 0 comments
Open

Uncaught TypeError: float() argument must be a string or a number #45

pigreco opened this issue Nov 21, 2017 · 0 comments
Labels

Comments

@pigreco
Copy link

pigreco commented Nov 21, 2017

Steps to reproduce

  1. Add DEM raster
  2. draw the line Temporare
  3. save 3D dxf, window appears, type name and send;
    error!!!
Traceback (most recent call last):
  File "C:/Users/Salvatore/.qgis2/python/plugins\profiletool\ui\ptdockwidget.py", line 573, in saveAs
    self.outDXF()
  File "C:/Users/Salvatore/.qgis2/python/plugins\profiletool\ui\ptdockwidget.py", line 590, in outDXF
    PlottingTool().outDXF(self.iface, self, self.mdl, self.cboLibrary.currentText (), self.profiletoolcore.profiles)
  File "C:/Users/Salvatore/.qgis2/python/plugins\profiletool\tools\plottingtool.py", line 560, in outDXF
    drawing.add(dxf.polyline(points, color=7, layer=name))
  File "C:/Users/Salvatore/.qgis2/python/plugins\profiletool\dxfwrite\engine.py", line 395, in polyline
    return Polyline(points, **kwargs)
  File "C:/Users/Salvatore/.qgis2/python/plugins\profiletool\dxfwrite\entities.py", line 612, in __init__
    self.add_vertices(points)
  File "C:/Users/Salvatore/.qgis2/python/plugins\profiletool\dxfwrite\entities.py", line 636, in add_vertices
    self.add_vertex(point)
  File "C:/Users/Salvatore/.qgis2/python/plugins\profiletool\dxfwrite\entities.py", line 628, in add_vertex
    self.vertices.append(Vertex(location=point, **kwargs))
  File "C:/Users/Salvatore/.qgis2/python/plugins\profiletool\dxfwrite\entities.py", line 812, in __init__
    super(Vertex, self).__init__(**default)
  File "C:/Users/Salvatore/.qgis2/python/plugins\profiletool\dxfwrite\entities.py", line 196, in __init__
    self[key] = value
  File "C:/Users/Salvatore/.qgis2/python/plugins\profiletool\dxfwrite\entities.py", line 204, in __setitem__
    self.attribs[key] = self._get_dxf_atom(key, value)  # factory is called
  File "C:/Users/Salvatore/.qgis2/python/plugins\profiletool\dxfwrite\entities.py", line 221, in _get_dxf_atom
    return attrib.factory(value, attrib.group_code)
  File "C:/Users/Salvatore/.qgis2/python/plugins\profiletool\dxfwrite\base.py", line 329, in __init__
    super(DXFPoint3D, self).__init__(coords, index_shift)
  File "C:/Users/Salvatore/.qgis2/python/plugins\profiletool\dxfwrite\base.py", line 264, in __init__
    self.point = [DXFFloat(value, (pos+1)*10+index_shift) for pos, value in enumerate(coords)]
  File "C:/Users/Salvatore/.qgis2/python/plugins\profiletool\dxfwrite\base.py", line 237, in __init__
    super(DXFFloat, self).__init__(float(value), group_code)
TypeError: float() argument must be a string or a number

profiletool 4.0.2, QGIS 2.18.14 on Windows 10

@borysiasty borysiasty added the bug label May 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants