Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Morph not working after index 0 #66

Open
aconn21 opened this issue Jul 5, 2020 · 1 comment
Open

Morph not working after index 0 #66

aconn21 opened this issue Jul 5, 2020 · 1 comment

Comments

@aconn21
Copy link

aconn21 commented Jul 5, 2020

When trying to Morph on an index other than 0, I get this error: hidP error: not value array

Example: bstick.morph(channel=0,index=1,name="green",duration=1000,steps=50)

Full error below:

Traceback (most recent call last):
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "c:\program files (x86)\microsoft visual studio\2019\community\common7\ide\extensions\microsoft\python\core\debugpy_main
.py", line 45, in
cli.main()
File "c:\program files (x86)\microsoft visual studio\2019\community\common7\ide\extensions\microsoft\python\core\debugpy/..\debugpy\server\cli.py", line 361, in main
run()
File "c:\program files (x86)\microsoft visual studio\2019\community\common7\ide\extensions\microsoft\python\core\debugpy/..\debugpy\server\cli.py", line 203, in run_file
runpy.run_path(options.target, run_name="main")
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Alex\Dropbox\BlinkStick\BlinkStick\BlinkStick.py", line 359, in
bstick.morph(channel=0,index=1,name="green",duration=1000,steps=50)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\blinkstick\blinkstick.py", line 685, in morph
r_start, g_start, b_start = remap_rgb_value_reverse(self._get_color_rgb(index), self.max_rgb_value)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\blinkstick\blinkstick.py", line 378, in _get_color_rgb
data = self.get_led_data((index + 1) * 3)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\blinkstick\blinkstick.py", line 472, in get_led_data
device_bytes = self._usb_ctrl_transfer(0x80 | 0x20, 0x1, report_id, 0, max_leds * 3 + 2)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\blinkstick\blinkstick.py", line 235, in _usb_ctrl_transfer
return self.reports[wValue - 1].get()
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pywinusb\hid\core.py", line 1522, in get
self.set_raw_data(raw_data)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pywinusb\hid\core.py", line 1375, in set_raw_data
byref(self.__raw_data), len(self.__raw_data)) )
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pywinusb\hid\winapi.py", line 395, in init
raise helpers.HIDError("hidP error: %s" % self.error_message_dict[error_code])
pywinusb.hid.helpers.HIDError: hidP error: not value array

@jasekk99
Copy link

I also get this Error when using anything other than index=0, haven't found a way to solve this yet :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants