Closed gvpane closed 1 year ago
That is strange. My first thought is that maybe MetaData
is a keyword/function/class/something used by Reaper IDE somehow, which is messing it up. Otherwise I don't see how that specific error message is possible. Maybe try running MetaData.__module__.__file__
to see where it's defined? Even if that is the case, it shouldn't be messing with internal library files, which makes this even more strange.
# 2 is expected because that MetaData()
is never even created if there are no devices.
To clarify, put something like print(MetaData.__module__.__file__)
on a new line right before the line the error occurs on and let me know what the output is.
File "C:\Users\IVMetalFoundry\AppData\Local\Programs\Python\Python310\lib\site-packages\openrgb\utils.py", line 492, in unpack return cls(
Thank you for responding:
I did what you asked
it returned:
File "C:\Users\George-Valentin.Pane\AppData\Local\Programs\Python\Python310\lib\site-packages\openrgb\utils.py", line 492, in unpack print(MetaData.module.file) AttributeError: 'str' object has no attribute 'file'. Did you mean: 'le'?
Oh. oops. Don't give advice when you're tired. Try again without the .__file__
part
the Reaper IDE has no running output so I had to raise an error instead of print
hope it has the answers you need
File "C:\Users\George-Valentin.Pane\AppData\Local\Programs\Python\Python310\lib\site-packages\openrgb\utils.py", line 492, in unpack raise Exception("FOR jath03>>>", MetaData.module, "<<<FOR jath03") Exception: ('FOR jath03>>>', 'openrgb.utils', '<<<FOR jath03')
just for the heck of it I put a try: for the problematic return and the error jumped to another line:
File "C:\Users\George-Valentin.Pane\AppData\Local\Programs\Python\Python310\lib\site-packages\openrgb\utils.py", line 350, in unpack return cls( TypeError: ModeData() takes no arguments
put a try: again and the error jumped again:
File "C:\Users\George-Valentin.Pane\AppData\Local\Programs\Python\Python310\lib\site-packages\openrgb\utils.py", line 441, in unpack return cls( TypeError: ZoneData() takes no arguments
Something that might be worth running, since Reaper seems not to properly understand any of the dataclasses decorators:
from dataclasses import dataclass
@dataclass
class Test:
test_var: int
@classmethod
def test(cls):
return cls(1)
raise Exception(Test(2).test().test_var)
This runs fine in my (non-Reaper) IDE, but I'm interested to see if Reaper has the same issue with this test case. Sorry if this is irrelevant by now lol.
I'm going to close this as it hasn't been updated in a while and seemed like the problems ran deeper than openrgb-python.
First of all, thank you for writing this module.
I am trying to make Reaper DAW communicate with openRGB through the openrgb-python module using the Reaper IDE in order to bring extra feedback in my studio environment.
I am getting a strange behavior on client = OpenRGBClient() in Reaper IDE in certain conditions and I don't understand where the problem lies. Because it only happens when using the Reaper IDE and an RGB is connected to the openRGB server.
I have tried using protocol_versions 0, 1, 2, 3 with no luck.
openrgb-python - 0.2.15 openRGB SDK server - 0.7 python version - 3.10.1
One thing I should mention is that when the error occurs, the connection to the openRGB server is done for a split second and then it disappears.
I also tried running the function when the server is offline and got the expected timeout traceback.
Script execution error
Traceback (most recent call last): File "rRGB.py", line 5, in
client = OpenRGBClient()
File "C:\Users\IVMetalFoundry\AppData\Local\Programs\Python\Python310\lib\site-packages\openrgb\orgb.py", line 337, in init
self.update()
File "C:\Users\IVMetalFoundry\AppData\Local\Programs\Python\Python310\lib\site-packages\openrgb\orgb.py", line 502, in update
self.comms.requestDeviceNum()
File "C:\Users\IVMetalFoundry\AppData\Local\Programs\Python\Python310\lib\site-packages\openrgb\network.py", line 188, in requestDeviceNum
self.read()
File "C:\Users\IVMetalFoundry\AppData\Local\Programs\Python\Python310\lib\site-packages\openrgb\network.py", line 116, in read
self.callback(device_id, packet_type, buff[0])
File "C:\Users\IVMetalFoundry\AppData\Local\Programs\Python\Python310\lib\site-packages\openrgb\orgb.py", line 348, in _callback
self.comms.requestDeviceData(x)
File "C:\Users\IVMetalFoundry\AppData\Local\Programs\Python\Python310\lib\site-packages\openrgb\network.py", line 181, in requestDeviceData
self.read()
File "C:\Users\IVMetalFoundry\AppData\Local\Programs\Python\Python310\lib\site-packages\openrgb\network.py", line 137, in read
self.callback(device_id, packet_type, utils.ControllerData.unpack(data, self._protocol_version))
File "C:\Users\IVMetalFoundry\AppData\Local\Programs\Python\Python310\lib\site-packages\openrgb\utils.py", line 547, in unpack
metadata = MetaData.unpack(data, version)
File "C:\Users\IVMetalFoundry\AppData\Local\Programs\Python\Python310\lib\site-packages\openrgb\utils.py", line 492, in unpack
return cls(
TypeError: MetaData() takes no arguments
I haven;t found anymore info regarding this problem other than this traceback. Thank you!