Axidraw error

Home Evil Mad Scientist Forums AxiDraw Axidraw error

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #29303
    Tirki
    Participant

    My desk had become a rats nest of cables so I stripped them all out and ran them all neatly. I have double checked the USB connectivity with the axidraw by disconnecting it and trying to do extensions/axidraw control/setup/apply. I get the expected message:

    “No available axidraw units found on USB.
    Please check your connection(s) and try again.”

    With the axidraw USB and power plugged in I get the following Python error. Any suggestions?

    Traceback (most recent call last):
    File “axidraw_control.py”, line 32, in <module>
    exit_status.run(e.affect)
    File “/home/glenn/.config/inkscape/extensions/axidraw_deps/ink_extensions_utils/exit_status.py”, line 26, in run
    return func(*args, **kwargs)
    File “/home/glenn/.config/inkscape/extensions/axidraw_deps/ink_extensions/inkex.py”, line 291, in affect
    self.effect()
    File “/home/glenn/.config/inkscape/extensions/axidraw_deps/axidrawinternal/axidraw_control.py”, line 130, in effect
    EBBList = ebb_serial.listEBBports()
    File “/home/glenn/.config/inkscape/extensions/axidraw_deps/plotink/ebb_serial.py”, line 208, in listEBBports
    com_ports_list = list(comports())
    File “/home/glenn/.config/inkscape/extensions/axidraw_deps/serial/tools/list_ports_linux.py”, line 102, in comports
    for info in [SysFS(d) for d in devices]
    File “/home/glenn/.config/inkscape/extensions/axidraw_deps/serial/tools/list_ports_linux.py”, line 102, in <listcomp>
    for info in [SysFS(d) for d in devices]
    File “/home/glenn/.config/inkscape/extensions/axidraw_deps/serial/tools/list_ports_linux.py”, line 48, in __init__
    num_if = int(self.read_line(self.usb_device_path, ‘bNumInterfaces’))
    TypeError: int() argument must be a string, a bytes-like object or a number, not ‘NoneType’

    #29304
    Windell Oskay
    Keymaster

    The “ugly” error message is due to an unhandled linux-specific situation in an underlying software library that the AxiDraw software uses. (We have submitted a patch to fix their error message, but it hasn’t been accepted yet.)

    What the message *should* say instead of that is something like “Failed to connect to AxiDraw.” Since you’re seeing a difference versus fully unconnected, I’d recommend resetting the AxiDraw and/or restarting your computer. Unplug it from both power and USB, and then connect it by USB alone until you’re making a good connection again. If that doesn’t help, unplug it again and try restarting your computer before plugging in USB again.

    #29361
    Tirki
    Participant

    I have gone through a bunch of gyrations without any success. The interesting part is I can see the tty Axidraw interface in /dev. Looks like this:
    crw-rw—- 1 root dialout 166, 0 Jul 10 15:57 ttyACM0

    The USB interface for the Axidraw is listed in lsusb as :
    Bus 002 Device 005: ID 04d8:fd92 Microchip Technology, Inc.

    When I try to connect to the Axidraw from Inkscape extensions I get the following message in the syslog:

    Jul 10 17:15:26 XPS-8100 kernel: [ 397.937688] audit: type=1400 audit(1625955326.388:144): apparmor=”DENIED” operation=”open” profile=”snap.inkscape.inkscape” name=”/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2.3/bNumInterfaces” pid=5411 comm=”python3″ requested_mask=”r” denied_mask=”r” fsuid=1000 ouid=0

    Now the really interesting part is I get this message in syslog even though Apparmor has been disabled (sudo systemctl disable apparmor)

    My next step is to remove the SNAP installed version of Inkscape and install the apt-get version and test that. I will let you know how that goes.
    Thanks!

    #29362
    Windell Oskay
    Keymaster

    Make sure that you’re in dialout and have logged out and back in, and then yes, try the apt method.

    #29364
    Tirki
    Participant

    OK, I have removed the SNAP inkscape and installed Inkscape 9.2 with apt-get. Now I get a different message when trying to plot from the Axidraw extensions:

    AxiDraw software must be run with python 3.5 or greater.

    I am running the Anaconda distribution of Python 3.7 :

    (base) glenn@XPS-8100:~/Desktop$ python
    Python 3.7.6 (default, Jan 8 2020, 19:59:22)
    [GCC 7.3.0] :: Anaconda, Inc. on linux

    My PYTHONPATH is /home/glenn/anaconda3

    #29365
    Windell Oskay
    Keymaster

    I imagine that’s Inkscape 0.92, which runs with python 2.7. It’s likely using a different python on your system, if you’re getting that message.

    If you want to run that version of Inkscape, you’ll need to use an older release of the AxiDraw software that supports it. (The current AxiDraw software requires Inkscape 1.0 or newer.) You can find Linux install instructions for 0.92 on an old version of our wiki page:
    https://wiki.evilmadscientist.com/index.php?title=Axidraw_Software_Installation&oldid=3766

    (Remove the current AxiDraw software first.)

    Alternately, hand-modify your Inkscape preferences file to use that version of python 3.7 that you have on your computer:
    https://wiki.inkscape.org/wiki/index.php/Extension_Interpreters#Selecting_a_specific_interpreter_version_.28via_preferences_file.29

    #29366
    Tirki
    Participant

    OK, I installed Inkscape 9.2 and the older Axidraw extensions then modified preferences.xml to reflect the current python3.8 on my Ubuntu machine and my Axidraw is back!

    This is a relief, I had almost convinced myself that I had damaged the EBB board.

    Thanks for all your help! I learned a few things. I do prefer to use the newest version of Inkscape so I will tinker with the SNAP install and see if I can isolate the error to the apparmor Inkscape profile.
    Cheers!

    #29367
    Windell Oskay
    Keymaster

    Great; that’s progress. I’d suggest tinkering with the apt-get method instead, so that you’ll have the best chance of avoiding further permissions issues.

    #29371
    Tirki
    Participant

    You are spot on. I installed the inkscape ppa then installed Inkscape 1.1 with apt-get and everything is working like a champ.

    Looks like the SNAP install method is not quite cooked yet.

    Thanks again for all your help!

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.