vlachoudis / bCNC

GRBL CNC command sender, autoleveler and g-code editor
GNU General Public License v2.0
1.54k stars 528 forks source link

UnboundLocalError: cannot access local variable 'ef' where it is not associated with a value #1870

Open garyemiller opened 5 months ago

garyemiller commented 5 months ago
Job done. Purging the controller. (Running: False)
Traceback (most recent call last):
  File "/home/gem/src/venv/lib/python3.11/site-packages/bCNC/Utils.py", line 533, in __call__
    return self.func(*args)
           ^^^^^^^^^^^^^^^^
  File "/home/gem/src/venv/lib/python3.11/site-packages/bCNC/bmain.py", line 1098, in showInfo
    self.canvas.showInfo(self.editor.getSelectedBlocks())
  File "/home/gem/src/venv/lib/python3.11/site-packages/bCNC/CNCCanvas.py", line 1215, in showInfo
    df = (ef - sf) / float(n)
          ^^
UnboundLocalError: cannot access local variable 'ef' where it is not associated with a value
Traceback (most recent call last):
  File "/home/gem/src/venv/lib/python3.11/site-packages/bCNC/Utils.py", line 533, in __call__
    return self.func(*args)
           ^^^^^^^^^^^^^^^^
  File "/home/gem/src/venv/lib/python3.11/site-packages/bCNC/bmain.py", line 1098, in showInfo
    self.canvas.showInfo(self.editor.getSelectedBlocks())
  File "/home/gem/src/venv/lib/python3.11/site-packages/bCNC/CNCCanvas.py", line 1215, in showInfo
    df = (ef - sf) / float(n)
          ^^
UnboundLocalError: cannot access local variable 'ef' where it is not associated with a value
Traceback (most recent call last):
  File "/home/gem/src/venv/lib/python3.11/site-packages/bCNC/Utils.py", line 533, in __call__
    return self.func(*args)
           ^^^^^^^^^^^^^^^^
  File "/home/gem/src/venv/lib/python3.11/site-packages/bCNC/bmain.py", line 1098, in showInfo
    self.canvas.showInfo(self.editor.getSelectedBlocks())
  File "/home/gem/src/venv/lib/python3.11/site-packages/bCNC/CNCCanvas.py", line 1215, in showInfo
    df = (ef - sf) / float(n)
          ^^
UnboundLocalError: cannot access local variable 'ef' where it is not associated with a value
Traceback (most recent call last):
  File "/home/gem/src/venv/lib/python3.11/site-packages/bCNC/Utils.py", line 533, in __call__
    return self.func(*args)
           ^^^^^^^^^^^^^^^^
  File "/home/gem/src/venv/lib/python3.11/site-packages/bCNC/ToolsPage.py", line 1981, in execute
    self.tools.getActive().execute(self.app)
  File "/home/gem/src/venv/lib/python3.11/site-packages/bCNC/ToolsPage.py", line 1085, in execute
    app.pocket(name)
  File "/home/gem/src/venv/lib/python3.11/site-packages/bCNC/bmain.py", line 2092, in pocket
    msg = self.gcode.pocket(blocks, diameter, stepover, name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/gem/src/venv/lib/python3.11/site-packages/bCNC/CNC.py", line 4534, in pocket
    newpath.extend(self._pocket(path, -D * diameter, stepover, 0))
TypeError: 'NoneType' object is not iterable