Installing the 7i96 Configuration Tool

More
21 Jan 2021 21:59 #196153 by Ewok2
Hello
2 years ago I use this wonderfull tools.
Now I have buy a spindle which is manageble by the 7I96 MESA card (0-10V input)
I have a debian stech with LinuxCnc2.8

I have try to install the latest version either with "sudo python3 setup.py install" or installing the deb package but I get 3 error durring install...

File "build/bdist.linux-i686/egg/c7i96/c7i96.py", line 307
self.maxVelocityLbl.setText(f'{fpm} IPM')
SyntaxError: invalid syntax

File "build/bdist.linux-i686/egg/c7i96/card-broken.py", line 10
command = f"mesaflash --device 7i96 --addr {ipAddress} --readhmid"
SyntaxError: invalid syntax

File "/usr/local/lib/python3.5/dist-packages/c7i96-1.2.2-py3.5.egg/c7i96/card-broken.py", line 10
command = f"mesaflash --device 7i96 --addr {ipAddress} --readhmid"
SyntaxError: invalid syntax

any idea to solve the pb?

Thanks

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

More
22 Jan 2021 00:04 #196163 by BigJohnT
First thing I see is your trying to install it in a way that is not tested. Only installing the .deb with gdebi is tested. Make sure you have the latest deb file.

jethornton.github.io/7i96/install.html

JT

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

More
22 Jan 2021 07:27 - 22 Jan 2021 17:45 #196181 by Ewok2
Oups sorry I see a .deb and install it as other ;-)
Last edit: 22 Jan 2021 17:45 by Ewok2.

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

More
22 Jan 2021 17:44 #196250 by Ewok2
I have try to install the latest version gdebi but I get 2 error durring install...

File "build/bdist.linux-i686/egg/c7i96/c7i96.py", line 307
self.maxVelocityLbl.setText(f'{fpm} IPM')
SyntaxError: invalid syntax

File "build/bdist.linux-i686/egg/c7i96/card-broken.py", line 10
command = f"mesaflash --device 7i96 --addr {ipAddress} --readhmid"
SyntaxError: invalid syntax

any idea?

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

More
22 Jan 2021 18:56 #196259 by Ewok2
Hello JohnT

I am not good in python but when looking at the "c7i96.py" file line 307 it seems compare to other line that setText is waiting for a string ?
Does the letter "f" behind the '{fpm} IPM' normal?

And same question tor the file "card-broken.py", line 10 ?
the letter "f" at the beginning of the command ?

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

More
22 Jan 2021 23:57 #196297 by BigJohnT
This is line 307 in c7i96.py
		if text:

line 317 in c7i96.py is
			self.maxVelocityLbl.setText(f'{fpm} IPM')

A formatted string starts with the letter f or F then a single or double quote and inside the curly brackets is any code that should be evaluated.

The card-broken.py file is not even used and not even there any more. Perhaps you need a fresh copy of the deb and using the instructions install it with gdebi.

Quite possible that you are tying to use python 2 and install with setup.py which will not work at all.

JT

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

More
23 Jan 2021 14:54 #196336 by Ewok2
Oups I was wrong for the syntax of python ;-) need to learn more about python...

I have used the gdebi tools and the answer to python -V is 3.5.3

I have try with 1.1-1 deb package and get
Selecting previously unselected package python3-c7i96.
(Reading database ... 164468 files and directories currently installed.)
Preparing to unpack .../python3-c7i96_1.1-1_all.deb ...
Unpacking python3-c7i96 (1.1-1) ...
Setting up python3-c7i96 (1.1-1) ...
  File "/usr/lib/python3/dist-packages/c7i96/c7i96.py", line 238
    self.maxVelocityLbl.setText(f'{fpm} IPM')
                                           ^
SyntaxError: invalid syntax

dpkg: error processing package python3-c7i96 (--install):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for gnome-menus (3.13.3-9) ...
Processing triggers for desktop-file-utils (0.23-1) ...
Processing triggers for mime-support (3.60) ...

and with the latest 1.2.3-1 and get :
Selecting previously unselected package python3-c7i96.
(Reading database ... 164468 files and directories currently installed.)
Preparing to unpack .../python3-c7i96_1.2.3-1_all.deb ...
Unpacking python3-c7i96 (1.2.3-1) ...
Setting up python3-c7i96 (1.2.3-1) ...
  File "/usr/lib/python3/dist-packages/c7i96/c7i96.py", line 279
    self.maxVelocityLbl.setText(f'{fpm} IPM')
                                           ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/c7i96/card.py", line 47
    parent.errorMsgOk(f'LinuxCNC must be running\nthe {parent.configName.text()} configuration', 'Error')
                                                                                              ^
SyntaxError: invalid syntax

  File "/usr/lib/python3/dist-packages/c7i96/extcmd.py", line 72
    self.message(f"Executing process {self.p1.program()}")
                                                        ^
SyntaxError: invalid syntax

dpkg: error processing package python3-c7i96 (--install):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for gnome-menus (3.13.3-9) ...
Processing triggers for desktop-file-utils (0.23-1) ...
Processing triggers for mime-support (3.60) ...

don't no wy it does not work for me???

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

More
23 Jan 2021 21:48 - 23 Jan 2021 21:51 #196364 by BigJohnT
Your python version is too old... you need a minimum of Python 3.6 for f strings to work. This was introduced 6 years ago in 2015.

www.python.org/dev/peps/pep-0498/

What OS are you trying to install it on?

JT
Last edit: 23 Jan 2021 21:51 by BigJohnT.

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

More
24 Jan 2021 12:52 #196404 by Ewok2
Ok so the problem is found, thanks
I was in a Stretch distribution... (witch works with your tools 2 years ago ;-) )
I will update to buster!

Many thanks

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

More
24 Jan 2021 15:08 #196413 by Ewok2
Upgrade to Debian 10 with python 3.7.3 and it's works!!!
Thanks
now I have to configure the spindle :-)

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

Moderators: PCWjmelson
Time to create page: 0.153 seconds
Powered by Kunena Forum