openUC2 / UC2-Software-GIT

This repository hosts all necessary software for the UC2 project.
https://useetoo.org
Other
13 stars 6 forks source link

Quick Test Error: Press “CUS” Then got TypeError: send() got an unexpected keyword argument 'logging' #21

Closed BackMountainDevil closed 3 years ago

BackMountainDevil commented 3 years ago

As the README.md says

Quick test: Press “Start Preview” (using the touchscreen or the mousepad) on the top to start your camera stream. Press “CUS” on the left to get the LED-array-manipulation window and by pressing the blocks that represent the LEDs, create a smiley face.

I do that and it broke down. Output are below.

My Steps

  1. Open laptop hotspt, raspi 4
  2. Edit mqtt server in code(edit in #20 ). Flash into esp32. connect well
  3. test light via mqtt command - mosquitto_pub -t /S007/LAR01/RECM -m "PXL+2+127+255+50". work well
  4. run UC2-GUI on raspi4, do as Quick test: “Start Preview” work well then Press “CUS” fail to make smile

Error Output

Press “Start Preview” + Press “CUS”

Click to show ```bash pi@raspberrypi:~ $ ./UC2.sh [INFO ] [Logger ] Record log in /home/pi/.kivy/logs/kivy_21-07-24_5.txt [INFO ] [Kivy ] Installed at "/home/pi/berryconda3/envs/UC2envBERRYCONDA_VERSION=3/lib/python3.6/site-packages/kivy/__init__.py" [INFO ] [Python ] v3.6.1 | packaged by rpi | (default, Apr 20 2017, 19:35:19) [GCC 4.9.2] [INFO ] [Python ] Interpreter at "/home/pi/berryconda3/envs/UC2envBERRYCONDA_VERSION=3/bin/python" [INFO ] [Factory ] 186 symbols loaded [INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored) [INFO ] [Text ] Provider: sdl2 [INFO ] [Window ] Provider: sdl2 [INFO ] [GL ] Using the "OpenGL" graphics system [INFO ] [GL ] Backend used [INFO ] [GL ] OpenGL version [INFO ] [GL ] OpenGL vendor [INFO ] [GL ] OpenGL renderer [INFO ] [GL ] OpenGL parsed version: 2, 1 [INFO ] [GL ] Shading version [INFO ] [GL ] Texture max size <4096> [INFO ] [GL ] Texture max units <16> [INFO ] [Window ] auto add sdl2 input provider [INFO ] [Window ] virtual keyboard not allowed, single mode, not docked [ DEBUG ] [ UC2 ] Logging successfully initialized to -> uc2-20210724_002207.log Configuration file loaded [ WARNING ] [ kivy ] stderr: /home/pi/UC2/UC2-GUI/GPIODevice.py:27: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings. [ WARNING ] [ kivy ] stderr: GPIO.setup(14, GPIO.OUT) [ DEBUG ] [ UC2.init ] Cam is online. [ DEBUG ] [ UC2.toolbox ] False [ DEBUG ] [ UC2.toolbox ] Preview started [ WARNING ] [ kivy ] stderr: Traceback (most recent call last): [ WARNING ] [ kivy ] stderr: File "main.py", line 318, in [ WARNING ] [ kivy ] stderr: FluidiscopeApp().run() [ WARNING ] [ kivy ] stderr: File "/home/pi/berryconda3/envs/UC2envBERRYCONDA_VERSION=3/lib/python3.6/site-packages/kivy/app.py", line 950, in run [ WARNING ] [ kivy ] stderr: runTouchApp() [ WARNING ] [ kivy ] stderr: File "/home/pi/berryconda3/envs/UC2envBERRYCONDA_VERSION=3/lib/python3.6/site-packages/kivy/base.py", line 582, in runTouchApp [ WARNING ] [ kivy ] stderr: EventLoop.mainloop() [ WARNING ] [ kivy ] stderr: File "/home/pi/berryconda3/envs/UC2envBERRYCONDA_VERSION=3/lib/python3.6/site-packages/kivy/base.py", line 347, in mainloop [ WARNING ] [ kivy ] stderr: self.idle() [ WARNING ] [ kivy ] stderr: File "/home/pi/berryconda3/envs/UC2envBERRYCONDA_VERSION=3/lib/python3.6/site-packages/kivy/base.py", line 391, in idle [ WARNING ] [ kivy ] stderr: self.dispatch_input() [ WARNING ] [ kivy ] stderr: File "/home/pi/berryconda3/envs/UC2envBERRYCONDA_VERSION=3/lib/python3.6/site-packages/kivy/base.py", line 342, in dispatch_input [ WARNING ] [ kivy ] stderr: post_dispatch_input(*pop(0)) [ WARNING ] [ kivy ] stderr: File "/home/pi/berryconda3/envs/UC2envBERRYCONDA_VERSION=3/lib/python3.6/site-packages/kivy/base.py", line 248, in post_dispatch_input [ WARNING ] [ kivy ] stderr: listener.dispatch('on_motion', etype, me) [ WARNING ] [ kivy ] stderr: File "kivy/_event.pyx", line 709, in kivy._event.EventDispatcher.dispatch [ WARNING ] [ kivy ] stderr: File "/home/pi/berryconda3/envs/UC2envBERRYCONDA_VERSION=3/lib/python3.6/site-packages/kivy/core/window/__init__.py", line 1412, in on_motion [ WARNING ] [ kivy ] stderr: self.dispatch('on_touch_down', me) [ WARNING ] [ kivy ] stderr: File "kivy/_event.pyx", line 709, in kivy._event.EventDispatcher.dispatch [ WARNING ] [ kivy ] stderr: File "/home/pi/berryconda3/envs/UC2envBERRYCONDA_VERSION=3/lib/python3.6/site-packages/kivy/core/window/__init__.py", line 1428, in on_touch_down [ WARNING ] [ kivy ] stderr: if w.dispatch('on_touch_down', touch): [ WARNING ] [ kivy ] stderr: File "kivy/_event.pyx", line 709, in kivy._event.EventDispatcher.dispatch [ WARNING ] [ kivy ] stderr: File "/home/pi/berryconda3/envs/UC2envBERRYCONDA_VERSION=3/lib/python3.6/site-packages/kivy/uix/widget.py", line 545, in on_touch_down [ WARNING ] [ kivy ] stderr: if child.dispatch('on_touch_down', touch): [ WARNING ] [ kivy ] stderr: File "kivy/_event.pyx", line 709, in kivy._event.EventDispatcher.dispatch [ WARNING ] [ kivy ] stderr: File "/home/pi/berryconda3/envs/UC2envBERRYCONDA_VERSION=3/lib/python3.6/site-packages/kivy/uix/widget.py", line 545, in on_touch_down [ WARNING ] [ kivy ] stderr: if child.dispatch('on_touch_down', touch): [ WARNING ] [ kivy ] stderr: File "kivy/_event.pyx", line 709, in kivy._event.EventDispatcher.dispatch [ WARNING ] [ kivy ] stderr: File "/home/pi/berryconda3/envs/UC2envBERRYCONDA_VERSION=3/lib/python3.6/site-packages/kivy/uix/widget.py", line 545, in on_touch_down [ WARNING ] [ kivy ] stderr: if child.dispatch('on_touch_down', touch): [ WARNING ] [ kivy ] stderr: File "kivy/_event.pyx", line 709, in kivy._event.EventDispatcher.dispatch [ WARNING ] [ kivy ] stderr: File "/home/pi/berryconda3/envs/UC2envBERRYCONDA_VERSION=3/lib/python3.6/site-packages/kivy/uix/widget.py", line 545, in on_touch_down [ WARNING ] [ kivy ] stderr: if child.dispatch('on_touch_down', touch): [ WARNING ] [ kivy ] stderr: File "kivy/_event.pyx", line 709, in kivy._event.EventDispatcher.dispatch [ WARNING ] [ kivy ] stderr: File "/home/pi/berryconda3/envs/UC2envBERRYCONDA_VERSION=3/lib/python3.6/site-packages/kivy/uix/behaviors/button.py", line 151, in on_touch_down [ WARNING ] [ kivy ] stderr: self.dispatch('on_press') [ WARNING ] [ kivy ] stderr: File "kivy/_event.pyx", line 705, in kivy._event.EventDispatcher.dispatch [ WARNING ] [ kivy ] stderr: File "kivy/_event.pyx", line 1248, in kivy._event.EventObservers.dispatch [ WARNING ] [ kivy ] stderr: File "kivy/_event.pyx", line 1132, in kivy._event.EventObservers._dispatch [ WARNING ] [ kivy ] stderr: File "/home/pi/berryconda3/envs/UC2envBERRYCONDA_VERSION=3/lib/python3.6/site-packages/kivy/lang/builder.py", line 57, in custom_callback [ WARNING ] [ kivy ] stderr: exec(__kvlang__.co_value, idmap) [ WARNING ] [ kivy ] stderr: File "/home/pi/UC2/UC2-GUI/fluidiscope.kv", line 310, in [ WARNING ] [ kivy ] stderr: on_press: root.buttons_light(self) [ WARNING ] [ kivy ] stderr: File "main.py", line 164, in buttons_light [ WARNING ] [ kivy ] stderr: toolbox.buttons_light(self, instance) [ WARNING ] [ kivy ] stderr: File "/home/pi/UC2/UC2-GUI/fluidiscopeToolbox.py", line 573, in buttons_light [ WARNING ] [ kivy ] stderr: light_change_status(self, instance) [ WARNING ] [ kivy ] stderr: File "/home/pi/UC2/UC2-GUI/fluidiscopeToolbox.py", line 1334, in light_change_status [ WARNING ] [ kivy ] stderr: self, ignore_NA=True, sync_only=False, pattern=pattern) [ WARNING ] [ kivy ] stderr: File "/home/pi/UC2/UC2-GUI/fluidiscopeIO.py", line 333, in update_matrix [ WARNING ] [ kivy ] stderr: self.ids[prop_help].fl_value),logging=1) [ WARNING ] [ kivy ] stderr: TypeError: send() got an unexpected keyword argument 'logging' ```

Normal output

Only Press “Start Preview”

Click to show ```bash pi@raspberrypi:~ $ ./UC2.sh [INFO ] [Logger ] Record log in /home/pi/.kivy/logs/kivy_21-07-24_4.txt [INFO ] [Kivy ] Installed at "/home/pi/berryconda3/envs/UC2envBERRYCONDA_VERSION=3/lib/python3.6/site-packages/kivy/__init__.py" [INFO ] [Python ] v3.6.1 | packaged by rpi | (default, Apr 20 2017, 19:35:19) [GCC 4.9.2] [INFO ] [Python ] Interpreter at "/home/pi/berryconda3/envs/UC2envBERRYCONDA_VERSION=3/bin/python" [INFO ] [Factory ] 186 symbols loaded [INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored) [INFO ] [Text ] Provider: sdl2 [INFO ] [Window ] Provider: sdl2 [INFO ] [GL ] Using the "OpenGL" graphics system [INFO ] [GL ] Backend used [INFO ] [GL ] OpenGL version [INFO ] [GL ] OpenGL vendor [INFO ] [GL ] OpenGL renderer [INFO ] [GL ] OpenGL parsed version: 2, 1 [INFO ] [GL ] Shading version [INFO ] [GL ] Texture max size <4096> [INFO ] [GL ] Texture max units <16> [INFO ] [Window ] auto add sdl2 input provider [INFO ] [Window ] virtual keyboard not allowed, single mode, not docked [ DEBUG ] [ UC2 ] Logging successfully initialized to -> uc2-20210724_002130.log Configuration file loaded [ WARNING ] [ kivy ] stderr: /home/pi/UC2/UC2-GUI/GPIODevice.py:27: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings. [ WARNING ] [ kivy ] stderr: GPIO.setup(14, GPIO.OUT) [ DEBUG ] [ UC2.init ] Cam is online. [ DEBUG ] [ UC2.toolbox ] False [ DEBUG ] [ UC2.toolbox ] Preview started [ DEBUG ] [ UC2.toolbox ] Preview stopped! [ DEBUG ] [ UC2.io ] Config written. Sending: CLEAR [ INFO ] [ UC2.toolbox ] Closed camera ```

fail tried

I see the history of UC2-GUI/fluidiscopeIO.py. I find the argument 'logging' is 0 one year ago. Then I change it from 1 into 0. Do quick test and get the same reult. Thenk I look MQTTDevice.py for function send(). It seems nothing wired.

Have you met such thing before? Any advice will be appreciate

BackMountainDevil commented 3 years ago

I have tried some idea and found a solution to it - delete the argument logging.

# File: fluidiscopeIO.py
## before
fg.ledarr.send("PXL", pos, list( self.ids[prop_help].fl_value),logging=1)

## after
fg.ledarr.send("PXL", pos, list( self.ids[prop_help].fl_value))

That make it show me the 8x8 panel to operate the matrix. One morething: its appearaner may not be a smile on my raspi