morse-simulator / morse

The Modular OpenRobots Simulation Engine
http://morse-simulator.github.io/
Other
350 stars 155 forks source link

Morse is not working on Python 3.7 #805

Closed dreuter closed 5 years ago

dreuter commented 5 years ago

Morse is not working on Python 3.7 due to async being a keyword since 3.7.

To reproduce this set Python 3.7 as your system python and run the minimal example from the tutorials.

morse create my_first_sim
morse run my_first_sim
$ morse run my_first_sim/
/usr/bin/morse:339: DeprecationWarning: The SafeConfigParser class has been renamed to ConfigParser in Python 3.2. This alias will be removed in future versions. Use ConfigParser directly instead.
  config = configparser.SafeConfigParser()
* Adding </home/dreuter/dev/my_first_sim> to PYTHONPATH and MORSE_RESOURCE_PATH.
* Using default scene in environment <my_first_sim/>.
* morse 1.4-165-gf9c8-dirty
* Version 2.79.0 of Blender is untested but should work
Read blend: /usr/share/morse/data/morse_default_autorun.blend
[ERROR][MORSE] Uncaught exception, quit Blender.
Traceback (most recent call last):
  File "/home/dreuter/dev/my_first_sim/default.py", line 55, in <module>
    env = Environment('sandbox', fastmode = False)
  File "/usr/lib/python3.7/site-packages/morse/builder/environment.py", line 56, in __init__
    self._handle_default_interface()
  File "/usr/lib/python3.7/site-packages/morse/builder/environment.py", line 204, in _handle_default_interface
    self._configure_default_interface(component, component.default_interface)
  File "/usr/lib/python3.7/site-packages/morse/builder/environment.py", line 187, in _configure_default_interface
    child.add_stream(interface)
  File "/usr/lib/python3.7/site-packages/morse/builder/abstractcomponent.py", line 384, in add_stream
    direction = self._compute_direction(classpath)
  File "/usr/lib/python3.7/site-packages/morse/builder/abstractcomponent.py", line 333, in _compute_direction
    klass = get_class(classpath)
  File "/usr/lib/python3.7/site-packages/morse/helpers/loading.py", line 11, in get_class
    klass = load_module_attribute(module_name, class_name)
  File "/usr/lib/python3.7/site-packages/morse/helpers/loading.py", line 23, in load_module_attribute
    __import__(module_name)
  File "/usr/lib/python3.7/site-packages/morse/actuators/v_omega.py", line 2, in <module>
    from morse.core.services import service
  File "/usr/lib/python3.7/site-packages/morse/core/services.py", line 110
    def do_service_registration(fn, component_name = None, service_name = None, async = False, request_managers = None):
                                                                                    ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "/home/dreuter/dev/my_first_sim/default.py", line 55, in <module>
    env = Environment('sandbox', fastmode = False)
  File "/usr/lib/python3.7/site-packages/morse/builder/environment.py", line 56, in __init__
    self._handle_default_interface()
  File "/usr/lib/python3.7/site-packages/morse/builder/environment.py", line 204, in _handle_default_interface
    self._configure_default_interface(component, component.default_interface)
  File "/usr/lib/python3.7/site-packages/morse/builder/environment.py", line 187, in _configure_default_interface
    child.add_stream(interface)
  File "/usr/lib/python3.7/site-packages/morse/builder/abstractcomponent.py", line 384, in add_stream
    direction = self._compute_direction(classpath)
  File "/usr/lib/python3.7/site-packages/morse/builder/abstractcomponent.py", line 333, in _compute_direction
    klass = get_class(classpath)
  File "/usr/lib/python3.7/site-packages/morse/helpers/loading.py", line 11, in get_class
    klass = load_module_attribute(module_name, class_name)
  File "/usr/lib/python3.7/site-packages/morse/helpers/loading.py", line 23, in load_module_attribute
    __import__(module_name)
  File "/usr/lib/python3.7/site-packages/morse/actuators/v_omega.py", line 2, in <module>
    from morse.core.services import service
  File "/usr/lib/python3.7/site-packages/morse/core/services.py", line 110
    def do_service_registration(fn, component_name = None, service_name = None, async = False, request_managers = None):
                                                                                    ^
SyntaxError: invalid syntax

I do have a patch for this, but unfortunately this would mean changing the interface of a couple of functions.


severin-lemaignan commented 5 years ago

Closed by #806