• Members 1 post
    Oct. 8, 2019, 1:25 p.m.

    I am trying to run InkCut on Windows 10. When my serial device is disconnected, the "Configure Device" dialog displays. When it's connected, it crashes. I tried connecting the device after the dialog appears, but it still crashes.

    AppData\Local\Programs\Python\Python37-32\lib\site-packages\serial\tools\list_ports_common.py", line 74, in __eq__
        return self.device == other.device
    AttributeError: 'NoneType' object has no attribute 'device'
    

    Looks like the issue is in dialogs.enaml. I haven't spent too long looking at it yet (literally about 5 minutes), but it seems like these properties are being bound before we actually have a device:

    attr device: Device << plugin.device
    attr driver << device.declaration
    attr connection << device.connection
    attr protocol << connection.protocol
    

    Can we do a check for device / supply temp values so we don't get a crash, then update after the device is available?

  • Members 3 posts
    Oct. 8, 2019, 10:40 p.m.

    Hello fellow inkcut user, I am getting the same issue both on a raspberry pi install as well as on unbuntu.

    File "/home/vinyl/.local/lib/python3.6/site-packages/serial/tools/list_ports_common.py", line 74, in eq return self.device == other.device
    AttributeError: 'NoneType' object has no attribute 'device'

    I am able to fix this by changing the

    "port": "/dev/ttyUSB0",
    

    to

    "port": "/dev/ttyACM0",
    

    line in inkcut.device.json

    It looks pretty dead around here, I was going to look into this deeper but not sure I will have the time. Please post back if you code a solution.

  • Oct. 14, 2019, 2:40 p.m.

    Sorry for the late responses...

    This is a bug in pyserial that has been fixed a year ago in github.com/pyserial/pyserial/commit/8e45873bd66c9270d292d87eb58b54b066a896bc#diff-7e541549258574ad55b4d1c2eabf5237R78 but not released (seems as if whoever maintains pyserial does not do releases anymore).

    You can either modify list_ports_common.py as done in the diff above (copied below) or install the pyserial version from github.

        def __eq__(self, other):
            return isinstance(other, ListPortInfo) and self.device == other.device