Python version not available after 12.3 upgrade

A Plugin to create Plots from INDIGO data and other sources
User avatar
kw123
Posts: 8458
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: Python version not available after 12.3 upgrade

Post by kw123 »

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
User avatar
jay (support)
Site Admin
Posts: 18420
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Python version not available after 12.3 upgrade

Post by jay (support) »

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
User avatar
kw123
Posts: 8458
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: Python version not available after 12.3 upgrade

Post by kw123 »

posted v7.21.73

should work now.

Karl
DVDDave
Posts: 470
Joined: Sun Feb 26, 2006 6:33 pm
Location: San Jose, CA

Re: Python version not available after 12.3 upgrade

Post by DVDDave »

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 
User avatar
kw123
Posts: 8458
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: Python version not available after 12.3 upgrade

Post by kw123 »

>> 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
DVDDave
Posts: 470
Joined: Sun Feb 26, 2006 6:33 pm
Location: San Jose, CA

Re: Python version not available after 12.3 upgrade

Post by DVDDave »

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.
mbordas
Posts: 15
Joined: Wed Dec 28, 2016 12:06 am

Re: Python version not available after 12.3 upgrade

Post by mbordas »

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 92 times
hour.dat.formatted.txt
(1.89 KiB) Downloaded 86 times
day.dat.formatted.txt
(17.79 KiB) Downloaded 105 times
User avatar
kw123
Posts: 8458
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: Python version not available after 12.3 upgrade

Post by kw123 »

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
mbordas
Posts: 15
Joined: Wed Dec 28, 2016 12:06 am

Re: Python version not available after 12.3 upgrade

Post by mbordas »

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
User avatar
kw123
Posts: 8458
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: Python version not available after 12.3 upgrade

Post by kw123 »

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
mbordas
Posts: 15
Joined: Wed Dec 28, 2016 12:06 am

Re: Python version not available after 12.3 upgrade

Post by mbordas »

I'm using sqlite. Attaching the output from device_history_737987371
Attachments
sql output.txt
(463.62 KiB) Downloaded 94 times
User avatar
kw123
Posts: 8458
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: Python version not available after 12.3 upgrade

Post by kw123 »

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
User avatar
kw123
Posts: 8458
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: Python version not available after 12.3 upgrade

Post by kw123 »

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)
DVDDave
Posts: 470
Joined: Sun Feb 26, 2006 6:33 pm
Location: San Jose, CA

Re: Python version not available after 12.3 upgrade

Post by DVDDave »

Seems to be working now using py2 version. Thanks!

--Dave
hamw
Posts: 1248
Joined: Mon Mar 31, 2008 7:45 pm

Re: Python version not available after 12.3 upgrade

Post by hamw »

Hi Karl,

I moved to 2023.2 from 2021.2. IndigoPlot is not working. The folders look OK generally, with second/minute/hour plots there, and they appear to update but remain blank with zero bytes. I tried to restore from my saved 2021.2 backup and got a few devices over. But even trying to recreated devices new they are not sticking in the plugin and not plotting. I'm using Postgres, which is running. I've tried reloading the plugin with each change.

Any particular logs that would be helpful for you? Would appreciate your input.

Code: Select all

INDIGOplotD Warning             plotting  GNUPLOT error/warning for /Library/Application Support/Perceptive Automation/Indigo 2023.2/Preferences/Plugins/com.karlwachs.INDIGOplotD/gnu/Plot_Temp_Hum_Apt-minute-S1
   INDIGOplotD Warning             
plot  ,
      ^
"/Library/Application Support/Perceptive Automation/Indigo 2023.2/Preferences/Plugins/com.karlwachs.INDIGOplotD/gnu/Plot_Temp_Hum_Apt-minute-S1.gnu" line 35: invalid expression 


   INDIGOplotD Warning             plotting  GNUPLOT error/warning for /Library/Application Support/Perceptive Automation/Indigo 2023.2/Preferences/Plugins/com.karlwachs.INDIGOplotD/gnu/Plot_Temp_Hum_Apt-hour-S1
   INDIGOplotD Warning             
plot  ,
      ^
"/Library/Application Support/Perceptive Automation/Indigo 2023.2/Preferences/Plugins/com.karlwachs.INDIGOplotD/gnu/Plot_Temp_Hum_Apt-hour-S1.gnu" line 35: invalid expression 


   INDIGOplotD Warning             plotting  GNUPLOT error/warning for /Library/Application Support/Perceptive Automation/Indigo 2023.2/Preferences/Plugins/com.karlwachs.INDIGOplotD/gnu/Plot_Temp_Hum_Apt-day-S1
   INDIGOplotD Warning             
plot  ,
      ^
"/Library/Application Support/Perceptive Automation/Indigo 2023.2/Preferences/Plugins/com.karlwachs.INDIGOplotD/gnu/Plot_Temp_Hum_Apt-day-S1.gnu" line 35: invalid expression 


   INDIGOplotD Warning             plotting  GNUPLOT error/warning for /Library/Application Support/Perceptive Automation/Indigo 2023.2/Preferences/Plugins/com.karlwachs.INDIGOplotD/gnu/Plot_Temp_Hum_Attic-minute-S1
   INDIGOplotD Warning             "/Library/Application Support/Perceptive Automation/Indigo 2023.2/Preferences/Plugins/com.karlwachs.INDIGOplotD/gnu/Plot_Temp_Hum_Attic-minute-S1.gnu" line 39: warning: Skipping data file with no valid points
"/Library/Application Support/Perceptive Automation/Indigo 2023.2/Preferences/Plugins/com.karlwachs.INDIGOplotD/gnu/Plot_Temp_Hum_Attic-minute-S1.gnu" line 39: warning: Skipping data file with no valid points
"/Library/Application Support/Perceptive Automation/Indigo 2023.2/Preferences/Plugins/com.karlwachs.INDIGOplotD/gnu/Plot_Temp_Hum_Attic-minute-S1.gnu" line 39: warning: Skipping data file with no valid points
"/Library/Application Support/Perceptive Automation/Indigo 2023.2/Preferences/Plugins/com.karlwachs.INDIGOplotD/gnu/Plot_Temp_Hum_Attic-minute-S1.gnu" line 39: warning: Skipping data file with no valid points

   INDIGOplotD Warning             plotting  GNUPLOT error/warning for /Library/Application Support/Perceptive Automation/Indigo 2023.2/Preferences/Plugins/com.karlwachs.INDIGOplotD/gnu/Plot_Temp_Hum_Attic-hour-S1
   INDIGOplotD Warning             "/Library/Application Support/Perceptive Automation/Indigo 2023.2/Preferences/Plugins/com.karlwachs.INDIGOplotD/gnu/Plot_Temp_Hum_Attic-hour-S1.gnu" line 39: warning: Skipping data file with no valid points
"/Library/Application Support/Perceptive Automation/Indigo 2023.2/Preferences/Plugins/com.karlwachs.INDIGOplotD/gnu/Plot_Temp_Hum_Attic-hour-S1.gnu" line 39: warning: Skipping data file with no valid points
"/Library/Application Support/Perceptive Automation/Indigo 2023.2/Preferences/Plugins/com.karlwachs.INDIGOplotD/gnu/Plot_Temp_Hum_Attic-hour-S1.gnu" line 39: warning: Skipping data file with no valid points
"/Library/Application Support/Perceptive Automation/Indigo 2023.2/Preferences/Plugins/com.karlwachs.INDIGOplotD/gnu/Plot_Temp_Hum_Attic-hour-S1.gnu" line 39: warning: Skipping data file with no valid points

Code: Select all

INDIGOplotD Error               restarting SQL import,    it seems to hang. If this happens several times reload INDIGOplotD :
Post Reply

Return to “INDIGOplotD”