Smoopi is an application you run on a Raspberry Pi with a touch screen

Smoopi is an application you run on a Raspberry Pi with a touch screen to control Smoothie-powered machine. It even has MPG ( “pendant” ) support. We just added some screenshots for those curious what it can do : https://buff.ly/2tZVbfq

3 Likes

Hi @Arthur_Wolf, I’ve been trying to get Smoopi running on a Linux Mint pc for several hours with no result.

I’ve installed (and uninstalled) kivy several ways, but none work.
1, The Kivy version from the Kivy repos.
2. Using pip3, pip3 install --upgrade git+https://github.com/kivy/kivy.git@038acbf.
3. The Kivy version in the Mint repos.
4. Using pip3, pip3 install git+https://github.com/kivy/kivy.git@master.

Each time I make sure to fully purge the previous version to avoid conflicts.

Here is the console output (which I think is the same as the logs):

[INFO   ] [Logger      ] Record log in /home/rob/.kivy/logs/kivy_19-03-26_7.txt
[INFO   ] [Kivy        ] v1.11.0.dev0, git-6e1fb40, 20190325
[INFO   ] [Python      ] v3.5.2 (default, Nov 12 2018, 13:43:14) 
[GCC 5.4.0 20160609]
[INFO   ] [Factory     ] 184 symbols loaded
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_pil, img_gif (img_sdl2, img_ffpyplayer ignored)
[INFO   ] [Text        ] Provider: sdl2(['text_pango'] ignored)
[INFO   ] [Window      ] Provider: sdl2(['window_egl_rpi'] ignored)
[INFO   ] [GL          ] Using the "OpenGL" graphics system
[INFO   ] [GL          ] Backend used <sdl2>
[INFO   ] [GL          ] OpenGL version <b'4.5.0 NVIDIA 384.130'>
[INFO   ] [GL          ] OpenGL vendor <b'NVIDIA Corporation'>
[INFO   ] [GL          ] OpenGL renderer <b'GeForce GTX 550 Ti/PCIe/SSE2'>
[INFO   ] [GL          ] OpenGL parsed version: 4, 5
[INFO   ] [GL          ] Shading version <b'4.50 NVIDIA'>
[INFO   ] [GL          ] Texture max size <16384>
[INFO   ] [GL          ] Texture max units <32>
[INFO   ] [Window      ] auto add sdl2 input provider
[INFO   ] [Window      ] virtual keyboard not allowed, single mode, not docked
[ERROR  ] [Unhandled Exception]
[ERROR  ] [Traceback (most recent call last)]
  File "./main.py", line 1191, in <module>
    SmoothieHost().run()
  File "/home/rob/.local/lib/python3.5/site-packages/kivy/app.py", line 829, in run
    root = self.build()
  File "./main.py", line 963, in build
    Builder.load_file('rpi.kv')
  File "/home/rob/.local/lib/python3.5/site-packages/kivy/lang/builder.py", line 301, in load_file
    return self.load_string(data, **kwargs)
  File "/home/rob/.local/lib/python3.5/site-packages/kivy/lang/builder.py", line 368, in load_string
    parser = Parser(content=string, filename=fn)
  File "/home/rob/.local/lib/python3.5/site-packages/kivy/lang/parser.py", line 392, in __init__
    self.parse(content)
  File "/home/rob/.local/lib/python3.5/site-packages/kivy/lang/parser.py", line 498, in parse
    self.execute_directives()
  File "/home/rob/.local/lib/python3.5/site-packages/kivy/lang/parser.py", line 452, in execute_directives
    kivy.lang.builder.Builder.load_file(ref)
  File "/home/rob/.local/lib/python3.5/site-packages/kivy/lang/builder.py", line 290, in load_file
    data = fd.read()
  File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 7671: ordinal not in range(128)

 Error in sys.excepthook:
 Traceback (most recent call last):
   File "./main.py", line 1181, in handle_exception
     App.get_running_app().stop()
   File "/home/rob/.local/lib/python3.5/site-packages/kivy/app.py", line 864, in stop
     self.dispatch('on_stop')
   File "kivy/_event.pyx", line 707, in kivy._event.EventDispatcher.dispatch
   File "./main.py", line 921, in on_stop
     self.comms.stop(); # stop the aysnc loop
 AttributeError: 'SmoothieHost' object has no attribute 'comms'
 
 Original exception was:
 Traceback (most recent call last):
   File "./main.py", line 1191, in <module>
     SmoothieHost().run()
   File "/home/rob/.local/lib/python3.5/site-packages/kivy/app.py", line 829, in run
     root = self.build()
   File "./main.py", line 963, in build
     Builder.load_file('rpi.kv')
   File "/home/rob/.local/lib/python3.5/site-packages/kivy/lang/builder.py", line 301, in load_file
     return self.load_string(data, **kwargs)
   File "/home/rob/.local/lib/python3.5/site-packages/kivy/lang/builder.py", line 368, in load_string
     parser = Parser(content=string, filename=fn)
   File "/home/rob/.local/lib/python3.5/site-packages/kivy/lang/parser.py", line 392, in __init__
     self.parse(content)
   File "/home/rob/.local/lib/python3.5/site-packages/kivy/lang/parser.py", line 498, in parse
     self.execute_directives()
   File "/home/rob/.local/lib/python3.5/site-packages/kivy/lang/parser.py", line 452, in execute_directives
     kivy.lang.builder.Builder.load_file(ref)
   File "/home/rob/.local/lib/python3.5/site-packages/kivy/lang/builder.py", line 290, in load_file
     data = fd.read()
   File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
     return codecs.ascii_decode(input, self.errors)[0]
 UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 7671: ordinal not in range(128)

Any help greatly appreciated.

This looks like a locale issue. Basically your files are being interpreted as unicode when they are ascii (or vice versa).

Can you show me the env of your system? If I can set my Ubuntu system to the same locale I may be able to recreate the issue…

Or set your system to UTF-8, as all the files are in fact UTF-8 not unicode.
NOTE https://stackoverflow.com/questions/51026315/how-to-solve-unicodedecodeerror-in-python-3-6/51027262#51027262

1 Like

Wow, this look awesome!

That was it, thanks muchly @Arthur_Wolf .

My previous Locale environment:

LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"

My current environment (working):

LANG=C
LANGUAGE=en_GB
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=en_GB.UTF-8

Thanks again.

2 posts were split to a new topic: Inverted display on Smoopi