Python version not available after 12.3 upgrade

Posted on
Tue May 17, 2022 2:52 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: Python version not available after 12.3 upgrade

the plugin checks if any of these is installed:
/Library/Frameworks/Python.framework/Versions/Current/bin/python3
/usr/local/bin/python
/usr/bin/python2.7

When indigo 2022.1 gets installed
Library/Frameworks/Python.framework/Versions/Current/bin/python3
and
/usr/local/bin/python
gets installed

So it should find the proper version.

the error message:
"none of python versions 2.5 ..2.8 is installed ==> stopping INDIGOplotD"
is from an older version

v7.21.73 should work.
.. but I missed to post that one to the plugin store.

will do tomorrow morning

Karl

Posted on
Tue May 17, 2022 3:40 pm
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Python version not available after 12.3 upgrade

I'm not sure why the plugin would be testing this, as it wouldn't be able to start up if python weren't installed...

But in any event: /usr/local/bin/python is python 2, not python 3. /usr/local/bin/python3 is the most correct way to start up python 3 (unless you want to actually point to the frame work install directory).

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed May 18, 2022 9:13 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: Python version not available after 12.3 upgrade

posted v7.21.73

should work now.

Karl

Posted on
Wed May 18, 2022 10:12 am
DVDDave offline
Posts: 470
Joined: Feb 26, 2006
Location: San Jose, CA

Re: Python version not available after 12.3 upgrade

Thanks, Karl. Plots seem to be partially updating now but I get the following errors about once per sec:
Code: Select all
   INDIGOplotD Error               'invalid literal for float(): 60.6.3'
getsqldataFromFile @line 11057: 'sqlData.append([sqlHistoryData[1],float(sqlHistoryData[-1])])# take date field and data field ignore other fields (0=id, 2...x = day/wek .. fields last one is data field'
   INDIGOplotD Error               sql produced file with bad data

Posted on
Wed May 18, 2022 10:54 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: Python version not available after 12.3 upgrade

>> 60.6.3 << is not a valid number. that is correct ;)

could you do
1. indigoplotD menu Print FORMATTED ....
you should get something like (open file w textedit
Code: Select all
/Library/Application Support/Perceptive Automation/Indigo 2022.1/Preferences/Plugins/com.karlwachs.INDIGOplotD/data/minute.dat.formatted
(for minute, hour, day)
....
20220511114000 2;2;0;0;0; 140; 23.300; 100.00;
20220511114500 2;2;0;0;0; 141; 23.300; 100.00;
20220511115000 2;2;0;0;0; 142; 23.300; 100.00;
20220511115500 2;2;0;0;0; 143; 23.300; 100.00;
20220511120000 2;2;0;0;0; 144; 23.100; 100.00;
20220511120500 2;2;0;0;0; 145; 23.300; 100.00;
...
check if you can find 60.6.3,
if yes
1. post that line and some around it
2. do Re-load complete sql data (indigoplotD menu), check if error persists

Karl

Posted on
Wed May 18, 2022 4:42 pm
DVDDave offline
Posts: 470
Joined: Feb 26, 2006
Location: San Jose, CA

Re: Python version not available after 12.3 upgrade

I was not able to find 60.6.3 in the files. Reloading all the SQL data did not correct the error, although sometimes a different incorrect number (eg 72.67.1) would also show up in the error messages.

Reloading 2 days of SQL data stops the error until the plugin is restarted.

Posted on
Tue May 24, 2022 8:54 am
mbordas offline
Posts: 15
Joined: Dec 28, 2016

Re: Python version not available after 12.3 upgrade

I'm getting a similar error with v7.21.73 and Indigo 2022.1. Attaching the output from the "Print FORMATTED ...." command


Code: Select all
INDIGOplotD Error               'invalid literal for float(): 33..0'
getsqldataFromFile @line 11057: 'sqlData.append([sqlHistoryData[1],float(sqlHistoryData[-1])])# take date field and data field ignore other fields (0=id, 2...x = day/wek .. fields last one is data field'
   INDIGOplotD Error               sql produced file with bad data
   INDIGOplotD Error               'could not convert string to float: '
getsqldataFromFile @line 11057: 'sqlData.append([sqlHistoryData[1],float(sqlHistoryData[-1])])# take date field and data field ignore other fields (0=id, 2...x = day/wek .. fields last one is data field'
   INDIGOplotD Error               sql produced file with bad data
   INDIGOplotD Error               'invalid literal for float(): 33..0'
getsqldataFromFile @line 11057: 'sqlData.append([sqlHistoryData[1],float(sqlHistoryData[-1])])# take date field and data field ignore other fields (0=id, 2...x = day/wek .. fields last one is data field'
   INDIGOplotD Error               sql produced file with bad data
   INDIGOplotD Error               'could not convert string to float: '
getsqldataFromFile @line 11057: 'sqlData.append([sqlHistoryData[1],float(sqlHistoryData[-1])])# take date field and data field ignore other fields (0=id, 2...x = day/wek .. fields last one is data field'
   INDIGOplotD Error               sql produced file with bad data
   INDIGOplotD Error               'invalid literal for float(): 33..0'
getsqldataFromFile @line 11057: 'sqlData.append([sqlHistoryData[1],float(sqlHistoryData[-1])])# take date field and data field ignore other fields (0=id, 2...x = day/wek .. fields last one is data field'
   INDIGOplotD Error               sql produced file with bad data
   INDIGOplotD Error               'could not convert string to float: '
getsqldataFromFile @line 11057: 'sqlData.append([sqlHistoryData[1],float(sqlHistoryData[-1])])# take date field and data field ignore other fields (0=id, 2...x = day/wek .. fields last one is data field'
   INDIGOplotD Error               sql produced file with bad data
Attachments
minute.dat.formatted.txt
(1.89 KiB) Downloaded 60 times
hour.dat.formatted.txt
(1.89 KiB) Downloaded 57 times
day.dat.formatted.txt
(17.79 KiB) Downloaded 74 times

Posted on
Tue May 24, 2022 9:24 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: Python version not available after 12.3 upgrade

it looks as if the sql query does not work, no data is read.

could you check the directory
/Library/Application Support/Perceptive Automation/Indigo 2022.1/Preferences/Plugins/com.karlwachs.INDIGOplotD/sql/

then open (eg text edit) a file like
131394313-temperatureC

where the first part is the device id and the 2.part is the state you like to plot. it should look like:
Code: Select all
1;20220316084559;0.0
12;20220316084601;23.6
17;20220316085138;23.3
29;20220316093625;23.1
33;20220316094127;23.3
37;20220316094622;23.1
42;20220316095932;23.3
47;20220316100621;23.1
51;20220316101117;23.3
in format:
seq#;date-time; value

check if you find something like:
Code: Select all
 33..0
or any number that is not an integer or float like something with ..

the data flow is
sql query --> devID-devState --> minute.dat --> minute.dat.formatted

I guess the error is at the sql output

Karl

Posted on
Tue May 24, 2022 9:33 am
mbordas offline
Posts: 15
Joined: Dec 28, 2016

Re: Python version not available after 12.3 upgrade

Yep, in
Code: Select all
/Library/Application Support/Perceptive Automation/Indigo 2022.1/Preferences/Plugins/com.karlwachs.INDIGOplotD/sql/737987371-sensorValue
I found the line:

Code: Select all
66254;20211104071004;33..0

There are also some lines that seem to be missing a column completely:

Code: Select all
66096;20211103025519;39.0
66097;20210
66255;20211104074005;32.0


Code: Select all
383497;20220524104331;80.3
;82.0
383477;20220524092011;81.7

Posted on
Tue May 24, 2022 10:09 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: Python version not available after 12.3 upgrade

are you using sqlite or postures as your SQL db?


if it is postgres please open a terminal window and paste:
Code: Select all
/Applications/Postgres.app/Contents/Versions/latest/bin/psql indigo_history -U postgres -t -A -F ';' -c " SELECT id,  to_char(ts,'YYYYmmddHH24MIss'),  \"sensorValue\" from device_history_737987371 WHERE \"sensorValue\" IS NOT NULL  AND  ID > 0 order by id  LIMIT 10000000;"


then check the output

it is sqlite i need a little time to recreate the command string

Karl

Posted on
Tue May 24, 2022 10:56 am
mbordas offline
Posts: 15
Joined: Dec 28, 2016

Re: Python version not available after 12.3 upgrade

I'm using sqlite. Attaching the output from device_history_737987371
Attachments
sql output.txt
(463.62 KiB) Downloaded 64 times

Posted on
Tue May 24, 2022 11:42 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: Python version not available after 12.3 upgrade

ok I can reproduce the error.

when I reload the sql db I get the error, when I run the command in a terminal window I do not get it.

I guess this is a rights or buffer ... issue, it will take a little time to figure that one out.


Karl

Posted on
Wed May 25, 2022 3:13 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: Python version not available after 12.3 upgrade

changes in v7.21.74 @ 2021-05-25
===================================================

1. fixed:
sql produced file with bad data
INDIGOplotD Error 'could not convert string to float:


this version is ready to run under py3, but still uses py2

to move to py3 (with indigo 2022.1) : edit file info.plist and change server api version to 3.0

Karl

hopefully this is the last bugfix for py2. would like to move on to py3 and py3 only (= no support for py2)

Posted on
Wed May 25, 2022 8:39 am
DVDDave offline
Posts: 470
Joined: Feb 26, 2006
Location: San Jose, CA

Re: Python version not available after 12.3 upgrade

Seems to be working now using py2 version. Thanks!

--Dave

Who is online

Users browsing this forum: No registered users and 3 guests