Jump to content
Ultimaker Community of 3D Printing Experts

'nonetype' object has no attribute 'close' in cura 7.1


rorion
 Share

Recommended Posts

Posted · 'nonetype' object has no attribute 'close' in cura 7.1

out of the blue my cura 7.1 started to give me the above error and i dont know why
 

Thread 0x000002d8 (most recent call first):
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\UM\Backend\Backend.py", line 161 in _storeStderrToLogThread
  File "threading.py", line 862 in run
  File "threading.py", line 914 in _bootstrap_inner
  File "threading.py", line 882 in _bootstrap

Thread 0x000005c8 (most recent call first):
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\UM\Backend\Backend.py", line 149 in _storeOutputToLogThread
  File "threading.py", line 862 in run
  File "threading.py", line 914 in _bootstrap_inner
  File "threading.py", line 882 in _bootstrap

Thread 0x000017d4 (most recent call first):
  File "C:\Program Files\Ultimaker Cura 4.6\plugins\RemovableDriveOutputDevice\RemovableDrivePlugin.py", line 61 in _updateThread
  File "threading.py", line 862 in run
  File "threading.py", line 914 in _bootstrap_inner
  File "threading.py", line 882 in _bootstrap

Thread 0x00001ee8 (most recent call first):
  File "C:\Program Files\Ultimaker Cura 4.6\plugins\USBPrinting\USBPrinterOutputDeviceManager.py", line 86 in _updateThread
  File "threading.py", line 862 in run
  File "threading.py", line 914 in _bootstrap_inner
  File "threading.py", line 882 in _bootstrap

Thread 0x00003640 (most recent call first):
  File "threading.py", line 297 in wait
  File "zeroconf\__init__.py", line 2117 in wait
  File "zeroconf\__init__.py", line 1434 in run
  File "threading.py", line 914 in _bootstrap_inner
  File "threading.py", line 882 in _bootstrap

Thread 0x00000674 (most recent call first):
  File "threading.py", line 297 in wait
  File "threading.py", line 549 in wait
  File "C:\Program Files\Ultimaker Cura 4.6\plugins\UM3NetworkPrinting\src\Network\ZeroConfClient.py", line 74 in _handleOnServiceChangedRequests
  File "threading.py", line 862 in run
  File "threading.py", line 914 in _bootstrap_inner
  File "threading.py", line 882 in _bootstrap

Thread 0x000026e4 (most recent call first):
  File "threading.py", line 297 in wait
  File "zeroconf\__init__.py", line 2117 in wait
  File "zeroconf\__init__.py", line 1262 in run
  File "threading.py", line 914 in _bootstrap_inner
  File "threading.py", line 882 in _bootstrap

Thread 0x00001f58 (most recent call first):
  File "zeroconf\__init__.py", line 1183 in run
  File "threading.py", line 914 in _bootstrap_inner
  File "threading.py", line 882 in _bootstrap

Thread 0x000013e4 (most recent call first):
  File "threading.py", line 293 in wait
  File "threading.py", line 424 in acquire
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\UM\JobQueue.py", line 98 in _nextJob
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\UM\JobQueue.py", line 123 in run
  File "threading.py", line 914 in _bootstrap_inner
  File "threading.py", line 882 in _bootstrap

Thread 0x00002b30 (most recent call first):
  File "threading.py", line 293 in wait
  File "threading.py", line 424 in acquire
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\UM\JobQueue.py", line 98 in _nextJob
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\UM\JobQueue.py", line 123 in run
  File "threading.py", line 914 in _bootstrap_inner
  File "threading.py", line 882 in _bootstrap

Thread 0x00001798 (most recent call first):
  File "threading.py", line 293 in wait
  File "threading.py", line 424 in acquire
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\UM\JobQueue.py", line 98 in _nextJob
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\UM\JobQueue.py", line 123 in run
  File "threading.py", line 914 in _bootstrap_inner
  File "threading.py", line 882 in _bootstrap

Thread 0x000030e8 (most recent call first):
  File "threading.py", line 293 in wait
  File "threading.py", line 424 in acquire
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\UM\JobQueue.py", line 98 in _nextJob
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\UM\JobQueue.py", line 123 in run
  File "threading.py", line 914 in _bootstrap_inner
  File "threading.py", line 882 in _bootstrap

Current thread 0x00002728 (most recent call first):
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\cura\CrashHandler.py", line 379 in _logInfoWidget
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\cura\CrashHandler.py", line 180 in _createDialog
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\cura\CrashHandler.py", line 86 in __init__
  File "C:\cura-build-output\build\inst\bin\cura_app.py", line 166 in exceptHook
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\UM\Math\Polygon.py", line 224 in getConvexHull
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\cura\Scene\ConvexHullDecorator.py", line 292 in _compute2DConvexHull
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\cura\Scene\ConvexHullDecorator.py", line 109 in getConvexHull
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\cura\Scene\ConvexHullDecorator.py", line 168 in getPrintingArea
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\UM\Scene\SceneNode.py", line 289 in callDecoration
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\cura\Scene\CuraSceneNode.py", line 91 in collidesWithAreas
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\cura\BuildVolume.py", line 263 in updateNodeBoundaryCheck
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\cura\PlatformPhysics.py", line 56 in _onChangeTimerFinished
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\cura\PlatformPhysics.py", line 194 in _onToolOperationStopped
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\UM\Signal.py", line 332 in __performEmit
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\UM\Signal.py", line 219 in emit
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\UM\Controller.py", line 297 in _onToolOperationStopped
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\UM\Signal.py", line 332 in __performEmit
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\UM\Signal.py", line 219 in emit
  File "C:\Program Files\Ultimaker Cura 4.6\plugins\Tools\TranslateTool\TranslateTool.py", line 361 in event
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\UM\Controller.py", line 397 in event
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\UM\Signal.py", line 332 in __performEmit
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\UM\Signal.py", line 219 in emit
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\UM\Qt\QtMouseDevice.py", line 37 in handleEvent
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\UM\Qt\Bindings\MainWindow.py", line 190 in mouseReleaseEvent
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\UM\Qt\QtApplication.py", line 378 in exec_
  File "C:\cura-build-output\build\inst\lib\python3.5\site-packages\cura\CuraApplication.py", line 813 in run
  File "C:\cura-build-output\build\inst\bin\cura_app.py", line 234 in <module>
  File "Console.py", line 24 in <module>
  File "<frozen importlib._bootstrap>", line 634 in _load_backward_compatible
  File "<frozen importlib._bootstrap>", line 664 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 957 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 968 in _find_and_load
  File "__startup__.py", line 12 in <module>
  File "<frozen importlib._bootstrap>", line 634 in _load_backward_compatible
  File "<frozen importlib._bootstrap>", line 664 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 957 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 968 in _find_and_load
AttributeError: 'NoneType' object has no attribute 'close'


this is the log

  • Link to post
    Share on other sites

    Posted · 'nonetype' object has no attribute 'close' in cura 7.1

    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

    Posted (edited) · 'nonetype' object has no attribute 'close' in cura 7.1

    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 jerryd11
  • Link to post
    Share on other sites

    Posted · 'nonetype' object has no attribute 'close' in cura 7.1

    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.

  • Link to post
    Share on other sites

    Posted · 'nonetype' object has no attribute 'close' in cura 7.1

    Are you on the latest Octoprint plugin version?

  • Link to post
    Share on other sites

    Posted · 'nonetype' object has no attribute 'close' in cura 7.1

    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.

  • Link to post
    Share on other sites

    Posted · 'nonetype' object has no attribute 'close' in cura 7.1

    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?

  • Link to post
    Share on other sites

    Posted (edited) · 'nonetype' object has no attribute 'close' in cura 7.1

    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
    • Like 1
    Link to post
    Share on other sites

    Posted · 'nonetype' object has no attribute 'close' in cura 7.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.

  • Link to post
    Share on other sites

    Posted · 'nonetype' object has no attribute 'close' in cura 7.1

    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

    • Like 2
    Link to post
    Share on other sites

    Posted (edited) · 'nonetype' object has no attribute 'close' in cura 7.1

    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 3dprntz
  • Link to post
    Share on other sites

    Posted · 'nonetype' object has no attribute 'close' in cura 7.1
    2 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.

  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
     Share

    • Our picks

      • New here? Get ahead with a free onboarding course
        Hi,
         
        Often getting started is the most difficult part of any process. A good start sets you up for success and saves you time and energy that could be spent elsewhere. That is why we have a onboarding course ready for
        Ultimaker S5 Pro Bundle, Ultimaker S5, Ultimaker S3 Ultimaker 2+ Connect.   
        They're ready for you on the Ultimaker Academy platform. All you need to do to gain access is to register your product to gain free access. 
        Ready? Register your product here in just 60 seconds.
          • Like
        • 11 replies
    ×
    ×
    • Create New...