Rshell error raspberry pi0w to esp32
Rshell error raspberry pi0w to esp32
Connect by Screen to esp32 micropython is ok (raspberry pi0W =>> esp32 via usb )
But by rshell it not work:/
root@raspberrypi:/home/pi/esp# rshell --buffer-size=30 -p /dev/ttyU
SB0
Traceback (most recent call last):
File "/usr/local/bin/rshell", line 9, in <module>
load_entry_point('rshell==0.0.14', 'console_scripts', 'rshell')()
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 356, in loa
d_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2476, in lo
ad_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2190, in lo
ad
['__name__'])
File "/usr/local/lib/python3.4/dist-packages/rshell/command_line.py", li
ne 1, in <module>
import rshell.main
File "/usr/local/lib/python3.4/dist-packages/rshell/main.py", line 508
wrapper.extra_funcs = [*funcs]
^
SyntaxError: can use starred expression only as
assignment target
But by rshell it not work:/
root@raspberrypi:/home/pi/esp# rshell --buffer-size=30 -p /dev/ttyU
SB0
Traceback (most recent call last):
File "/usr/local/bin/rshell", line 9, in <module>
load_entry_point('rshell==0.0.14', 'console_scripts', 'rshell')()
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 356, in loa
d_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2476, in lo
ad_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2190, in lo
ad
['__name__'])
File "/usr/local/lib/python3.4/dist-packages/rshell/command_line.py", li
ne 1, in <module>
import rshell.main
File "/usr/local/lib/python3.4/dist-packages/rshell/main.py", line 508
wrapper.extra_funcs = [*funcs]
^
SyntaxError: can use starred expression only as
assignment target
Re: Rshell error raspberry pi0w to esp32
You can't use screen and rshell at the same time to connect to a MicroPython board. You need to quite out of screen and then use rshell,
Re: Rshell error raspberry pi0w to esp32
there is the same error.
Screen have no connection to esp.
Screen have no connection to esp.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Rshell error raspberry pi0w to esp32
@dhylands Dave, that line of code looks suspect to me. Should it read
Code: Select all
wrapper.extra_funcs = list(funcs)
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Rshell error raspberry pi0w to esp32
I created this little test program:pythoncoder wrote: ↑Sat Sep 08, 2018 4:54 pm@dhylands Dave, that line of code looks suspect to me. Should it read?Code: Select all
wrapper.extra_funcs = list(funcs)
Code: Select all
#!/usr/bin/env python3
import inspect
def extra_funcs(*funcs):
"""Decorator which adds extra functions to be downloaded to the pyboard."""
def extra_funcs_decorator(real_func):
def wrapper(*args, **kwargs):
return real_func(*args, **kwargs)
wrapper.extra_funcs = [*funcs]
wrapper.source = inspect.getsource(real_func)
wrapper.name = real_func.__name__
return wrapper
return extra_funcs_decorator
def foo1():
print('foo1')
def foo2():
print('foo2')
@extra_funcs(foo1, foo2)
def bar():
print('bar')
def test_func(func):
if hasattr(func, 'extra_funcs'):
print('test_func: extra_funcs =', func.extra_funcs)
else:
print('test_func: no extra_funcs')
test_func(bar)
I did a bit of searching and it appears that prior to 3.5.0 this syntax wasn't allowed. And using the `list(funcs)` variant works properly under python2, so I'll go ahead and change it.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Rshell error raspberry pi0w to esp32
That syntax must be new for V3.5, as it fails here under V3.4.3.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Rshell error raspberry pi0w to esp32
With python 3.4 & 3.7 not work.
The best idea is reinstall raspberry pi ?
The best idea is reinstall raspberry pi ?
Re: Rshell error raspberry pi0w to esp32
The quickest way would be to edit the file with the error and change the [*funcs] to list(funcs) i.e. Change: to be:
The file to edit was mentioned in the error: /usr/local/lib/python3.4/dist-packages/rshell/main.py line 508
Code: Select all
wrapper.extra_funcs = [*funcs]
Code: Select all
wrapper.extra_funcs = list(funcs)
Re: Rshell error raspberry pi0w to esp32
I just created and released version 0.0.15 of rshell which should address the problem.