ImportError: cannot import name 'ini' from 'linuxcnc'

More
23 Apr 2022 20:09 #241018 by tripwire
I've installed qtpyvcp as per www.qtpyvcp.com/install/bullseye.html

Everything proceeded without error except for the following:

dave@davesLinuxMachine:~$ qtpyvcp -h
Traceback (most recent call last):
  File "/home/dave/.local/bin/qtpyvcp", line 33, in <module>
    sys.exit(load_entry_point('qtpyvcp', 'console_scripts', 'qtpyvcp')())
  File "/home/dave/dev/qtpyvcp/qtpyvcp/app/__init__.py", line 72, in main
    from qtpyvcp.utilities.opt_parser import parse_opts
  File "/home/dave/dev/qtpyvcp/qtpyvcp/utilities/opt_parser.py", line 64, in <module>
    from linuxcnc import ini
ImportError: cannot import name 'ini' from 'linuxcnc' (unknown location)

It seems a module, opt_parser.py, is looking for a module, linuxcnc.py, in order to import a class, "ini". Is that correct? If so, where should this linuxcnc.py module reside? How does it get installed? Or is there another way to correct this error (without reinstalling the OS.)?

Thanks.

 

Please Log in or Create an account to join the conversation.

More
24 Apr 2022 16:58 #241080 by tripwire
It's strange that I can import linuxcnc but not "ini":

dave@davesLinuxMachine:~$ python3
Python 3.9.12 (main, Mar 24 2022, 13:02:21)
[GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import linuxcnc
>>> from linuxcnc import ini
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'ini' from 'linuxcnc' (unknown location)
>>>

Please Log in or Create an account to join the conversation.

More
24 Apr 2022 17:15 - 24 Apr 2022 17:17 #241086 by tripwire
Zeroing in on my own issue...

dave@davesLinuxMachine:~$ python3
Python 3.9.12 (main, Mar 24 2022, 13:02:21)
[GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import linuxcnc
>>> from linuxcnc import ini
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'ini' from 'linuxcnc' (unknown location)
>>> linuxcnc
<module 'linuxcnc' (namespace)>
>>> dir(linuxcnc)

>>> exit()
dave@davesLinuxMachine:~$ python3.10
Python 3.10.4 (main, Apr 2 2022, 09:04:19) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import linuxcnc
>>> dir(linuxcnc)
'ANGULAR', 'AUTO_FORWARD', 'AUTO_PAUSE', 'AUTO_RESUME', 'AUTO_REVERSE', 'AUTO_RUN', 'AUTO_STEP', 'BRAKE_ENGAGE', 'BRAKE_RELEASE', 'DEBUG_CONFIG', 'DEBUG_INTERP', 'DEBUG_INTERP_LIST', 'DEBUG_MOTION_TIME', 'DEBUG_NML', 'DEBUG_RCS', 'DEBUG_STATE_TAGS', 'DEBUG_TASK_ISSUE', 'DEBUG_VERSIONS', 'EXEC_DONE', 'EXEC_ERROR', 'EXEC_WAITING_FOR_DELAY', 'EXEC_WAITING_FOR_IO', 'EXEC_WAITING_FOR_MOTION', 'EXEC_WAITING_FOR_MOTION_AND_IO', 'EXEC_WAITING_FOR_MOTION_QUEUE', 'EXEC_WAITING_FOR_SPINDLE_ORIENTED', 'EXEC_WAITING_FOR_SYSTEM_CMD', 'FLOOD_OFF', 'FLOOD_ON', 'INTERP_IDLE', 'INTERP_PAUSED', 'INTERP_READING', 'INTERP_WAITING', 'JOG_CONTINUOUS', 'JOG_INCREMENT', 'JOG_STOP', 'KINEMATICS_BOTH', 'KINEMATICS_FORWARD_ONLY', 'KINEMATICS_IDENTITY', 'KINEMATICS_INVERSE_ONLY', 'LINEAR', 'MAX_AXIS', 'MAX_JOINTS', 'MIST_OFF', 'MIST_ON', 'MODE_AUTO', 'MODE_MANUAL', 'MODE_MDI', 'MOTION_TYPE_ARC', 'MOTION_TYPE_FEED', 'MOTION_TYPE_INDEXROTARY', 'MOTION_TYPE_PROBING', 'MOTION_TYPE_TOOLCHANGE', 'MOTION_TYPE_TRAVERSE', 'NML_DISPLAY', 'NML_ERROR', 'NML_TEXT', 'OPERATOR_DISPLAY', 'OPERATOR_ERROR', 'OPERATOR_TEXT', 'PREFIX', 'RCS_DONE', 'RCS_ERROR', 'RCS_EXEC', 'SHARE', 'SPINDLE_CONSTANT', 'SPINDLE_DECREASE', 'SPINDLE_FORWARD', 'SPINDLE_INCREASE', 'SPINDLE_OFF', 'SPINDLE_REVERSE', 'STATE_ESTOP', 'STATE_ESTOP_RESET', 'STATE_OFF', 'STATE_ON', 'TRAJ_MODE_COORD', 'TRAJ_MODE_FREE', 'TRAJ_MODE_TELEOP', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'command', 'draw_dwells', 'draw_lines', 'error', 'error_channel', 'gui_respect_offsets', 'gui_rot_offsets', 'ini', 'line9', 'nmlfile', 'positionlogger', 'stat', 'tool', 'version', 'vertex9'
>>>

module "linuxcnc" *does" contain "ini" in python3.10 but not python3.9. But I think there are issues with vtk in python3.10.

So...I'll keep you (me) posted...ha! (Feel free, anyone, to weigh in...)
Last edit: 24 Apr 2022 17:17 by tripwire.

Please Log in or Create an account to join the conversation.

More
25 Apr 2022 14:31 - 25 Apr 2022 15:27 #241207 by tripwire
I'll report back... Looking good so far...
Last edit: 25 Apr 2022 15:27 by tripwire.

Please Log in or Create an account to join the conversation.

More
25 Apr 2022 14:32 - 25 Apr 2022 15:26 #241208 by tripwire
I'm resorting to reinstalling Debian 11 and *closely* following the installation instructions here: www.qtpyvcp.com/install/bullseye.html
Last edit: 25 Apr 2022 15:26 by tripwire.

Please Log in or Create an account to join the conversation.

More
25 Apr 2022 15:49 - 25 Apr 2022 15:51 #241214 by tripwire
In the following steps, line 4:
cd ~/dev/linuxcnc/rip/debian
./configure uspace
cd ..
dpkg-buildpackage -b -uc
cd ..
WHY THE HELL AM I WAITING HERE FOR HOURS COMPILING DOCUMENTATION IN A BUNCH OF LANGUAGES I DON'T NEED??????????
Last edit: 25 Apr 2022 15:51 by tripwire.

Please Log in or Create an account to join the conversation.

More
25 Apr 2022 16:02 #241215 by tripwire
Success!
dave@DavesLinuxMachine:~$ qtpyvcp -i

    QtPyVCP Info
        Version:        python3_master+178.g247f6465

    LinuxCNC Info
        Version:        2.9.0~pre0

    Qt Info
        Qt Version:     5.15.2
        Qt API:         PyQt5
        Qt API Version: 5.15.2

    System Info
        Description:    Debian GNU/Linux 11 (bullseye)

        Kernel:         5.10.0-13-rt-amd64
        Version:        #1 SMP PREEMPT_RT Debian 5.10.106-1 (2022-03-17)
        Ram:            8 GB

    CPU Info
        Vendor ID:      Intel(R) Celeron(R) J4125 CPU @ 2.00GHz
        Architecture:   
        Physical Cores: 4
        Logical Cores:  4

    Network
        Hostname:       DavesLinuxMachine
        IP Address:     127.0.1.1
        MAC Address:    e9:a3:ee:b7:10:8d
The following user(s) said Thank You: TurBoss

Please Log in or Create an account to join the conversation.

More
26 Apr 2022 07:30 #241263 by rodw

In the following steps, line 4:
cd ~/dev/linuxcnc/rip/debian
./configure uspace
cd ..
dpkg-buildpackage -b -uc
cd ..
WHY THE HELL AM I WAITING HERE FOR HOURS COMPILING DOCUMENTATION IN A BUNCH OF LANGUAGES I DON'T NEED??????????

Yeh its annoying. You can add  no-docs to the command  line to ./configure.
The following user(s) said Thank You: tripwire

Please Log in or Create an account to join the conversation.

More
26 Apr 2022 16:40 #241307 by tripwire
Thanks for the tip, rodw! And I apologize for the slightly vulgar outburst. I was just wrestling with trying to get up and running with qtpyvcp/linuxcnc/debian for a few frustrating days.

But all seems good now.

Moral of the story--follow directions closely the first time!
The following user(s) said Thank You: TurBoss

Please Log in or Create an account to join the conversation.

More
26 Apr 2022 16:44 #241308 by tripwire
A question comes to mind:
Is it safe to install the updates that Debian 11 suggests? I really don't want to break my qtpyvcp setup...

Please Log in or Create an account to join the conversation.

Moderators: KCJLcvette
Time to create page: 0.080 seconds
Powered by Kunena Forum