Page MenuHomeAleph Objects Inc

Cura 2 Beta 2.6.19 on Mac would not connect to TAZ 6 via USB
Closed, ResolvedPublic


Could not get Cura 2 (2.6.19) to connect to TAZ 6 on Mac (10.12.5) OS.

With same printer, same computer, and same USB cable, Cura 1 connected without issue.

Event Timeline

I can confirm that I cannot connect to the printer on my Mac with a LulzBot Mini. I'll do some more investigation and collect the debug output.

This portion of the logging output may be relevant. We seem to be missing a module.

ERROR - UM.Logger.logException [80]: ImportError: No module named ''
ERROR - UM.PluginRegistry._populateMetaData [323]: Could not find plugin USBPrinting
ERROR - UM.Logger.logException [76]: Exception: Import error loading module USBPrinting
ERROR - UM.Logger.logException [80]: Traceback (most recent call last):
ERROR - UM.Logger.logException [80]: File "UM/PluginRegistry.pyc", line 367, in _findPlugin
ERROR - UM.Logger.logException [80]: File "imp.pyc", line 244, in load_module
ERROR - UM.Logger.logException [80]: File "imp.pyc", line 216, in load_package
ERROR - UM.Logger.logException [80]: File "<frozen importlib._bootstrap>", line 693, in _load
ERROR - UM.Logger.logException [80]: File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
ERROR - UM.Logger.logException [80]: File "<frozen importlib._bootstrap_external>", line 673, in exec_module
ERROR - UM.Logger.logException [80]: File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
ERROR - UM.Logger.logException [80]: File "/Volumes/Cura2-2.6.19-Darwin/", line 4, in <module>
ERROR - UM.Logger.logException [80]: File "/Volumes/Cura2-2.6.19-Darwin/", line 22, in <module>
ERROR - UM.Logger.logException [80]: ImportError: No module named ''

@benmalouf : If you assign this to @mbocevski he should be able to investigate adding the missing serial module to the Mac build.

karrad assigned this task to mbocevski.Jul 26 2017, 10:36 AM
Yahuba added a subscriber: Yahuba.Aug 15 2017, 10:48 AM

I was able to replicate this on vs 2.6.21 with both Mini and Taz 6 printers on Mac Sierra

I was able to replicate this on Windows 7 Cura2 vs 2.6.21: In the Mac version, the "connect" and "disconnect" buttons are grayed out and cannot use them but in Win 7, the buttons light up, are usable and there's a green box with a check mark over the Print Monitor icon which I had not seen in the Mac version. However, when I press connect, I get a message that its searching for a printer in the USB ports and eventually says it cannot find one.

Just to clarify: It looks like the Python serial module is missing from the MacOS install. As far as I can tell it was never included and no MacOS Cura 2 builds have ever been able to communicate with a printer.
Part of the logging output reports:

ImportError: No module named ''
alexei added a subscriber: alexei.Sep 8 2017, 1:46 PM

@tranter , @mbocevski , Yes and I think it's the same problem with MAC as in T1124. MAC build needs to be setup with cx_Freeze, because currently it's using Py2App.
Ultimaker switched everything to cx_Freeze long time ago and I switched LIN and WIN builds to cx_Freeze, but not the MAC, because I don't have any way of testing it.

Fixed. I've added the package "serial" in the python3 packages when building Cura2 for Mac. @Yahuba can you please verify?

Re-tested on 2.6.34 today and add printer dialogue is missing all of the Lulzbot printers, its only showing "custom", "other" and "ultimaker" options. If you advance past the page and navigate to the Print Monitor, the connect and control buttons are now activated (in green), however, I can not test because our printers are not available to add.

I am seeing this too.

It looks like this will work now, but we can't test it until T1192 is fixed.

After manually fixing T1192, I am able to connect to a printer and send move commands, etc.
But printing does not work. I think the cause is a missing Python module. I see this in the logging output:

2017-09-28 14:15:17,721 - ERROR - UM.Logger.logException [80]: ImportError: No module named 'objc'
2017-09-28 14:22:16,503 - CRITICAL - [42]: ImportError: No module named 'objc'

The errors about missing python package (objc): I've looked up in the code and there is only one place where this import is used - it is in Uranium in a part of the code that prevents the computer to go to sleep. So far these two errors (T1192 and T1034) does not seem to be related (except that 1192 may have blocked the testing of 1034). On first glance this error seems unrelated to the inability to print.

On the other hand I cannot find that we're packaging or building PyObjc in cura2 - we were installing it with pip for Cura 1 but it seems that it is not build/packaged for Cura 2.
I can try to add this module to the package, but not sure whether this is needed because we are not seeing this issue on the other platforms. Any ideas?

It looks like this code stops the computer from sleeping during printing, which was a bug that was reported in the past. It is only done on the Mac platform. We should try to include PyObjc so that this feature will work.

Ok. Will do that.

Re-tested in MAC OS X (El Capitan). Buttons were activated but when I clicked on "Connect", status remained "connecting" but a pop up window appeared labeled "Crash Report". I have attached the crash report. Testing on Sierra next.

Tested in Mac OS X Sierra on 2.6.36 - similar to El Cap however, this time it was stuck in "Connecting" status for a while.. got tired of waiting and clicked on "disconnect" and the crash report window appeared. Once you close the crash report, the application shuts down as well.

@Yahuba : Could you re-check if 2.6.38 MAC build has PyObjc in it now?

I am still not able to print, and see some errors related to objc:

2017-10-06 11:47:51,439 - DEBUG - UM.Qt.QtApplication.preventComputerFromSleeping [418]: Prevent computer from sleeping? False
2017-10-06 11:47:51,840 - CRITICAL - [39]: An uncaught exception has occurred!
2017-10-06 11:47:51,843 - CRITICAL - [42]: Traceback (most recent call last):
2017-10-06 11:47:51,846 - CRITICAL - [42]: File "cura/PrinterOutputDevice.pyc", line 140, in setJobState
2017-10-06 11:47:51,849 - CRITICAL - [42]: File "/Applications/", line 379, in _setJobState
2017-10-06 11:47:51,852 - CRITICAL - [42]: File "/Applications/", line 415, in cancelPrint
2017-10-06 11:47:51,855 - CRITICAL - [42]: File "/Applications/", line 209, in _printingStopped
2017-10-06 11:47:51,858 - CRITICAL - [42]: File "UM/Qt/QtApplication.pyc", line 437, in preventComputerFromSleeping
2017-10-06 11:47:51,861 - CRITICAL - [42]: File "/Applications/", line 739, in initFrameworkWrapper
2017-10-06 11:47:51,864 - CRITICAL - [42]: File "/Applications/", line 648, in _parseBridgeSupport
2017-10-06 11:47:51,867 - CRITICAL - [42]: File "/Applications/", line 613, in parseBridgeSupport
2017-10-06 11:47:51,869 - CRITICAL - [42]: File "/Applications/", line 815, in createStructType
2017-10-06 11:47:51,872 - CRITICAL - [42]: ValueError: invalid signature: not all fields have an embedded name
2017-10-06 11:47:51,875 - INFO - cura.CuraApplication.closeApplication [404]: Close application
2017-10-06 11:47:51,887 - DEBUG - UM.Qt.QtApplication.windowClosed [274]: Shutting down cura2_lulzbot
2017-10-06 11:47:51,902 - DEBUG - CuraEngineBackend.CuraEngineBackend._terminate [248]: Attempting to kill the engine process

@tranter : Thanks for the log file, very useful. Please try the most recent build for MAC I think I have this sleep function crash fixed (but not the functionality of preventing the sleep)
As far as

system_profiler[4030:56026] SPUSBDevice: IOServiceGetMatchingService did not return anything for location 0x04600000

concerned, from this link: it seems that once the connection breaks in the middle of communication,
the USB device becoming useless? Probably a reboot might fix it.

Good news! With the latest 2.6.38 build (date stamped 2017-10-06 12:11), I was able to perform a complete print on a Mac.

Yahuba added a comment.EditedOct 10 2017, 9:03 AM

We just tried to test this morning on 2.6.38 (2017-10-10 03:46) on both Mac mini and iMac (OS X El Cap & Sierra). Looks like we are stuck in a loop that goes as follows:

  1. When you click on "Connect", after a few seconds, "Change Tool Head" screen pops up.
  2. If you "Automatically Change Firmware", it completes the update, you click "finish", machine goes back to connecting mode and a message comes up that "Firmware is Outdated" and "Change Tool Head" dialogue box pops back up.

I also tried to manually update firmware from the firmware download page but on a mac it seems to save the .hex or .config files as .txt files by adding the .txt extension. I tried removing the .txt extension and the file appears on the list of the firmware upgrade dialogue but it is grayed out and does not let me choose it.

Confirmed that all mac systems are connecting to printer.

Steven added a subscriber: Steven.Oct 24 2017, 3:51 PM

@Yahuba can this ticket be closed then?

Yes, I'm not getting the option to close the ticket on my end though.

Steven closed this task as Resolved.Oct 25 2017, 1:03 PM