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

fix crash when getStartTime() returns None #378

Merged
merged 1 commit into from Feb 15, 2014
Merged

fix crash when getStartTime() returns None #378

merged 1 commit into from Feb 15, 2014

Conversation

rosenhouse
Copy link

In testing the devel branch with a short (<100 line) gcode file, I was hitting a crash that looked like this

2014-02-15 04:12:11,400 - octoprint.util.comm - ERROR - Something crashed inside the serial connection loop, please report this in OctoPrint's bug tracker:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/OctoPrint-1.1.0_dev-py2.7.egg/octoprint/util/comm.py", line 829, in _monitor
    self._sendNext()
  File "/usr/local/lib/python2.7/dist-packages/OctoPrint-1.1.0_dev-py2.7.egg/octoprint/util/comm.py", line 950, in _sendNext
    "time": time.time() - self._currentFile.getStartTime()
TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'

This commit fixes the crash for me.

foosel added a commit that referenced this pull request Feb 15, 2014
fix crash when getStartTime() returns None
@foosel foosel merged commit 1935cc4 into OctoPrint:devel Feb 15, 2014
@foosel
Copy link
Member

foosel commented Feb 15, 2014

Thanks!

@rosenhouse rosenhouse deleted the fix-time-crash branch February 15, 2014 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants