I usually wait for a while to upgrade, by I had some persistent problems on my Mac that had me chomping at the bit, since I felt it was related to iCloud syncing and the changes to Yosemite might help (and they did - things running fine).
It DID of course, break two of my plugins. And it's the two I wrote (doh!). They're pretty similar serial parsing/writing plugins, but unfortunately, I opened them up and literally can't believe I ever wrote them. It looks totally foreign to me (yes, I struggled through Python for those plugins and only those plugins. NO other experience).
The break looks simple (like the say a variable is defined or something. Basically needs an integer of 'size 1'.
Anyone care to take a look here? I'm hoping this is just 'obvious' to someone who codes regularly and can suggest the minor edit (I hope) that is required.
From the Log:
- Code: Select all
NuVo Grand Concerto Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last):
File "plugin.py", line 144, in runConcurrentThread
File "/Library/Application Support/Perceptive Automation/Indigo 6/IndigoPluginHost.app/Contents/PlugIns/serial/urlhandler/protocol_socket.py", line 171, in write
File "/Library/Application Support/Perceptive Automation/Indigo 6/IndigoPluginHost.app/Contents/PlugIns/serial/serialutil.py", line 78, in to_bytes
<type 'exceptions.TypeError'>: an integer or string of size 1 is required
NuVo Grand Concerto Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Relevant Code (Lines 121-147): (Offending statement seems to be "send count=.....")
- Code: Select all
def runConcurrentThread(self):
## This is what runs as the plugin is simply 'running'.
## Basically, if a command comes in from the serial device, you read it, parse it and hand it off to
## whatever device/or variable needs to have its state updated.
## In the meantime, you have a queue set up which gets loaded with commands from devices which must be fed
## to the serial interface to be enacted.
try:
while True:
if self.portEnabled:
self.debugLog("Loop Running")
sleeptime = 0.1
fromgrandconcerto = 0
fromgrandconcerto = self.conn.readline()
if len(fromgrandconcerto) > 3:
sleeptime = 0.01
self.debugLog("Nuvo: " + fromgrandconcerto[:-2]) #removes last two characters (CR and LF)
self.parseToServer(fromgrandconcerto[:-2])
if len(self.commQueue) > 0:
sleeptime = 0.01
# Sleep is set slow to keep processor use down, but putting 18 commands through with
# 0.1 sleeptime takes almost 2 seconds, so if there's commands in the queue, drop the sleeptime, and
# bang them through really fast. Then reset at beginning of loop.
self.debugLog(self.commQueue[0])
sendcount = self.conn.write("*" + self.commQueue.pop(0) + "\r")
self.sleep(sleeptime)
except self.StopThread:
pass
Any ideas?