Python and OSC Commands

Discuss Python scripts here.
jltnol
Posts: 1009
Joined: Tue Oct 15, 2013 11:11 pm

Python and OSC Commands

Post by jltnol »

After installing Indigo 2023.2, I’m running into problems sending OSC commands from Indigo, which worked in 2023.1. When I run the command in Indigo, the event log gives me this message:

Code: Select all

Script Error                    action group "Q-O-07.12      Summer #2" embedded script error:
   Script Error                    No module named 'pythonosc'
   Script Error                    Exception Traceback (most recent call shown last):

     embedded script, line 1, at top level
ModuleNotFoundError: No module named 'pythonosc'
I’ve re-installed the OSC module and this comes back in Terminal:

Code: Select all

Requirement already satisfied: python-osc in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (1.8.1)
Kitchen-Automation:~ kitchen$ 
So based on this message, I’m guessing one of two things:
1. The version of OSC I have installed only works with Python 2.x so won’t work with the newest version of Indigo.

Or

2. The OSC software is installed in a location that Indigo can’t find/use/access
And lastly, perhaps both.

I'm just trying to figure out where I should start looking for answers. Guessing this is the python/osc version that is the problem, but before I start looking, it would at least good to know I'm actually looking in the right place... :)
User avatar
GlennNZ
Posts: 1583
Joined: Sun Dec 07, 2014 3:33 pm
Location: Central Coast, Australia

Python and OSC Commands

Post by GlennNZ »

But looks like you used pip to install dependency (when need to pip3 install) ?

This is based on the bit - where you copy

Code: Select all

requirement already satisfied
I presume that is a pip response.

If that is the case, that is the issue. You are referencing python2.7 which no longer exists for indigo.

Need to pip3 install dependency, for it to be accessible by indigo.
Seems like should be

Code: Select all

pip3 install python-osc
jltnol
Posts: 1009
Joined: Tue Oct 15, 2013 11:11 pm

Re: Python and OSC Commands

Post by jltnol »

well that was damn easy. I did the install pip3 command, got prompted to do an update, then ran the pip3 osc command and now all is groovy!

I would have never figured this out by myself. Thanks for your help!!
User avatar
Korey
Posts: 822
Joined: Wed Jun 04, 2008 11:47 am
Location: Henderson, NV
Contact:

Re: Python and OSC Commands

Post by Korey »

Out of curiosity, What are you doing with OSC commands?

Thanks!
--
Korey
jltnol
Posts: 1009
Joined: Tue Oct 15, 2013 11:11 pm

Re: Python and OSC Commands

Post by jltnol »

I'm using it to send commands to a lighting control system..... basically sending commands to tell the lighting program what light show to run at which time and on what day. It, in turn, connects via DMX to the lighting fixtures, the fixtures which are also powered on and off by Indigo. Currently on Mardi Gras colors.....
Attachments
mg.jpg
mg.jpg (221.96 KiB) Viewed 553 times
Post Reply

Return to “Python Scripting”