It's happening to me as well. Immediately after slicing and attempting an Octoprint print. Saving the file and saving to SD works fine as does printing from those files and importing them manually to Octoprint but the direct connection throws that error since last night on a model I had successfully printed earlier in the evening with no settings changes. And on every subsequent file I try.
Edited by jerryd11I am also getting the same thing. It only happens with "Print with OctoPrint" and it seemed to crop up after I imported a profile.
Oops! My OctoPrint instance was not responding to requests. The error message could be more descriptive, but that was my issue with OctoPrint, not Cura.
Are you on the latest Octoprint plugin version?
There seem to be two different things in this thread. The original report by @rorion was a hard crash to the crash dialog with the error "'NoneType' object has no attribute 'close'". Cura could not continue. The sparse information that was given does not indicate any relation to the OctoPrint plugin, but seems to have happened while attempting to move an object.
What @jerryd11 and @aschaetter see is an error related to OctoPrint, where Cura does not crash but show the error "'NoneType' object has no attribute 'state'". That error has been reported to me before here, but sofar I had not been able to reproduce it. With the additional message from @aschaetter I now have a chance to see if I can reproduce and fix it. @jerryd11, can you confirm that your octoprint instance may have gone unresponsive?
The frustrating part of people saying "I have the same thing", when they have a different thing, is that we still don't know what happened with @rorion.
- 2 months later...
I get the 'nonetype' object has no attribute 'close' every time I click on the Print with Octoprint button in Cura. I'm using the Linux Ultimaker_Cura-4.8.0.AppImage on a fully updated version of Arch Linux.
2020-12-24 10:04:04,352 - ERROR - [MainThread] UM.Logger.logException [106]: Exception: Unable to write to file camera_mount_front: 'NoneType' object has no attribute 'state' 2020-12-24 10:04:04,354 - ERROR - [MainThread] UM.Logger.logException [110]: Traceback (most recent call last): 2020-12-24 10:04:04,356 - ERROR - [MainThread] UM.Logger.logException [110]: File "/build/4.8/build/inst/lib/python3.5/site-packages/UM/Qt/Bindings/OutputDeviceManagerProxy.py", line 150, in _writeToDevice 2020-12-24 10:04:04,359 - ERROR - [MainThread] UM.Logger.logException [110]: File "/home/justin/.local/share/cura/4.8/plugins/OctoPrintPlugin/OctoPrintPlugin/OctoPrintOutputDevice.py", line 418, in requestWrite 2020-12-24 10:04:04,361 - ERROR - [MainThread] UM.Logger.logException [110]: if self.activePrinter.state == "offline" and self._auto_print and (use_power_plugin or auto_connect): 2020-12-24 10:04:04,363 - ERROR - [MainThread] UM.Logger.logException [110]: AttributeError: 'NoneType' object has no attribute 'state'
As this happens every time I try to use it, I can duplicate it as many times as anyone might need to help fix it. Is there anything I can do to help fix it?
In all the cases that have been reported to me so far, it turned out that the network connection between Cura and the OctoPrint instance was failing. A version of the plugin that does not throw the error is awaiting approval for the Marketplace, but if the network connection has indeed failed it will not be able to send prints to OctoPrint either.
In case your network connection is not the problem, do you use any sort of OctoPrint plugin to turn the power of your printer on/off?
Edited by ahoeben-
1
Both Octoprint and my PC running Cura are plugged into the same Ethernet switch, & the web browser on the same PC was streaming the video from Octoprint just fine as that error has been generated, so I can guarantee you that it had absolutely nothing to do with IP connectivity between Octoprint and my PC. Just to double confirm this, I ran a continual ping as I generated the error, and my connectivity was 100% the whole time.
Yes, I have the Octoprint plugin Automatic Shutdown installed - however, even if I disable it, then restart both Octoprint and Cura, it still gives exactly the same error in exactly the same way, as soon as I press the Print with Octoprint button.
My deepest apologies. I fixed the problem by going right back to basics in Manage Printers then selecting Connect Octoprint and resetting my API key and requesting authorisation again. I think that error should say something like "Can't reach Octoprint API - Check your API Key and Octoprint URL", as that was the source, rather than a python error. Thanks for your time
-
2
- 2 months later...
I get the error 'nonetype' object has no attribute 'Chop' on mine. Seems to happen when I want to work with gcode. Dosen't work if I try downloading it to the computer or over network.
Edited by 3dprntz2 hours ago, 3dprntz said:I get the error 'nonetype' object has no attribute 'Chop'
We need to see more of the (crash-)log to know what is going on. In this case I think there's a plugin at play because I cannot find the keyword "Chop" in the entire Cura codebase, nor in any of my plugins.
Recommended Posts
ahoeben 1,886
What triggers the error? ie: what do you do immediately before the error happens?
Can you share Cura.log from the configuration folder?
NB: Cura 7.1 does not exist. Cura 4.7.1 does.
Link to post
Share on other sites