AttributeError: module 'serial' has no attribute 'serial_for_url'
#config_version=4
hardware: platform: opp driverboards: gen2
opp: ports: /dev/cu.usbmodem146121 baud: 115200
switches: s_left_flipper: number: 2-16 tags: left_flipper s_right_flipper: number: 2-17 tags: right_flipper
coils: c_flipper_left: number: 0-0 allow_enable: yes hold_power: 2 c_flipper_right: number: 0-1 allow_enable: yes hold_power: 2
flippers: left_flipper: main_coil: c_flipper_left activation_switch: s_left_flipper enable_events: machine_reset_phase_3 right_flipper: main_coil: c_flipper_right activation_switch: s_right_flipper enable_events: machine_reset_phase_3
MacBook:mini_pinball_v0 madi$ mpf -bMachine : Mission Pinball Framework Core Engine v0.33.49Machine : Command line arguments: {'mc_file_name': None, 'no_load_cache': False, 'create_config_cache': True, 'consoleloglevel': 20, 'syslog_address': None, 'logfile': 'logs/2018-02-07-16-00-47-mpf-MacBook.local.log', 'force_platform': None, 'pause': False, 'force_assets_load': False, 'configfile': ['config'], 'loglevel': 11, 'bcp': False, 'mpfconfigfile': '/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/mpfconfig.yaml'}Machine : MPF path: /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpfMachine : Machine path: /Users/madi/Documents/Pinball/mini_pinball_v0Machine : Platform: darwinMachine : Python executable location: /Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5Machine : Python version: 3.5.2 (64-bit)Machine : Loading config from original filesMachine : Machine config file #1: /Users/madi/Documents/Pinball/mini_pinball_v0/config/configMachine : Config file cache created: /var/folders/gt/g919nfqj04l8xmnhwkzh3nvw0000gn/T/53bd5a222337892b6d7849a81898bdc9configOPP : Configuring OPP hardware.SwitchController : Loading the SwitchControllerOPP : Connecting to /dev/cu.usbmodem146121 at 115200bpsroot : module 'serial' has no attribute 'serial_for_url'Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/commands/game.py", line 181, in __init__ MachineController(mpf_path, machine_path, vars(args)).run() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/core/machine.py", line 127, in __init__ self._initialize_platforms() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/core/machine.py", line 198, in _initialize_platforms platform.initialize() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/platforms/opp/opp.py", line 91, in initialize self._connect_to_hardware() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/platforms/opp/opp.py", line 154, in _connect_to_hardware platform=self, port=port, baud=self.config['baud'])) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/platforms/opp/opp.py", line 938, in __init__ super().__init__(platform, port, baud) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/platforms/base_serial_communicator.py", line 27, in __init__ self.machine.clock.loop.run_until_complete(self._connect_to_hardware(port, baud)) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/base_events.py", line 387, in run_until_complete return future.result() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/futures.py", line 274, in result raise self._exception File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/tasks.py", line 239, in _step result = coro.send(None) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/platforms/base_serial_communicator.py", line 35, in _connect_to_hardware self.reader, self.writer = yield from connector File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/core/clock.py", line 132, in open_serial_connection **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/coroutines.py", line 206, in coro res = func(*args, **kw) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/serial_asyncio/__init__.py", line 410, in create_serial_connection ser = serial.serial_for_url(*args, **kwargs)AttributeError: module 'serial' has no attribute 'serial_for_url'
Jan
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
certifi (2017.11.5)
chardet (3.0.4)
cyflash (1.6)
Cython (0.24.1)
docutils (0.14)
future (0.16.0)
idna (2.6)
iso8601 (0.1.12)
Kivy (1.10.0)
Kivy-Garden (0.1.4)
mpf (0.33.49)
mpf-mc (0.33.16)
mpf-monitor (0.2.1)
pip (9.0.1)
psutil (5.4.3)
Pygments (2.2.0)
PyQt5 (5.10)
pyserial (3.4)
pyserial-asyncio (0.4)
PyYAML (3.12)
requests (2.18.4)
ruamel.base (1.0.0)
ruamel.yaml (0.10.23)
serial (0.0.38)
setuptools (38.4.0)
sip (4.19.7)
typing (3.6.4)
urllib3 (1.22)
MacBook:mini_pinball_v0 madi$ mpf -bMachine : Mission Pinball Framework Core Engine v0.33.49Machine : Command line arguments: {'mpfconfigfile': '/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/mpfconfig.yaml', 'force_assets_load': False, 'pause': False, 'loglevel': 11, 'logfile': 'logs/2018-02-07-19-32-46-mpf-MacBook.local.log', 'configfile': ['config'], 'syslog_address': None, 'bcp': False, 'create_config_cache': True, 'no_load_cache': False, 'consoleloglevel': 20, 'mc_file_name': None, 'force_platform': None}Machine : MPF path: /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpfMachine : Machine path: /Users/madi/Documents/Pinball/mini_pinball_v0Machine : Platform: darwinMachine : Python executable location: /Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5Machine : Python version: 3.5.2 (64-bit)Machine : Loading config from original filesMachine : Machine config file #1: /Users/madi/Documents/Pinball/mini_pinball_v0/config/configMachine : Config file cache created: /var/folders/gt/g919nfqj04l8xmnhwkzh3nvw0000gn/T/53bd5a222337892b6d7849a81898bdc9configOPP : Configuring OPP hardware.SwitchController : Loading the SwitchControllerOPP : Connecting to /dev/cu.usbmodem146121 at 115200bpsEventManager : Event: ======'machine_var_mpf_version'====== Args={'change': False, 'value': 'MPF v0.33.49', 'prev_value': 'MPF v0.33.49'}EventManager : Event: ======'machine_var_mpf_extended_version'====== Args={'change': False, 'value': 'MPF v0.33.49, Config version:4, Show version: 4, BCP version:1.1', 'prev_value': 'MPF v0.33.49, Config version:4, Show version: 4, BCP version:1.1'}EventManager : Event: ======'machine_var_python_version'====== Args={'change': False, 'value': '3.5.2', 'prev_value': '3.5.2'}EventManager : Event: ======'machine_var_platform'====== Args={'change': False, 'value': 'Darwin-16.7.0-x86_64-i386-64bit', 'prev_value': 'Darwin-16.7.0-x86_64-i386-64bit'}EventManager : Event: ======'machine_var_platform_system'====== Args={'change': False, 'value': 'Darwin', 'prev_value': 'Darwin'}EventManager : Event: ======'machine_var_platform_release'====== Args={'change': False, 'value': '16.7.0', 'prev_value': '16.7.0'}EventManager : Event: ======'machine_var_platform_version'====== Args={'change': False, 'value': 'Darwin Kernel Version 16.7.0: Thu Jan 11 22:59:40 PST 2018; root:xnu-3789.73.8~1/RELEASE_X86_64', 'prev_value': 'Darwin Kernel Version 16.7.0: Thu Jan 11 22:59:40 PST 2018; root:xnu-3789.73.8~1/RELEASE_X86_64'}EventManager : Event: ======'machine_var_platform_machine'====== Args={'change': False, 'value': 'x86_64', 'prev_value': 'x86_64'}EventManager : Event: ======'init_phase_1'====== Args={}Machine : Shutting down...EventManager : Event: ======'shutdown'====== Args={}OPP : Stop called on serial connection /dev/cu.usbmodem146121asyncio : Exception in callback EventManager._done(<Task finishe...146121-2-16')>)handle: <Handle EventManager._done(<Task finishe...146121-2-16')>)>Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/events.py", line 125, in _run self._callback(*self._args) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/core/events.py", line 572, in _done future.result() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/futures.py", line 274, in result raise self._exception File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/tasks.py", line 239, in _step result = coro.send(None) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/core/events.py", line 507, in _run_handlers_sequential handler.callback(queue=queue, **merged_kwargs) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/core/device_manager.py", line 81, in _load_device_modules self.initialize_devices() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/core/device_manager.py", line 162, in initialize_devices collection[device_name].device_added_system_wide() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/core/system_wide_device.py", line 13, in device_added_system_wide self._initialize() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/devices/switch.py", line 75, in _initialize self.hw_switch = self.platform.configure_switch(self.config) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/platforms/opp/opp.py", line 671, in configure_switch "with number %s which doesn't exist", number)AssertionError: ("A request was made to configure an OPP switch with number %s which doesn't exist", '/dev/cu.usbmodem146121-2-16')root : Event loop stopped before Future completed.Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/commands/game.py", line 181, in __init__ MachineController(mpf_path, machine_path, vars(args)).run() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/core/machine.py", line 134, in __init__ self.clock.loop.run_until_complete(self._run_init_phases()) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/base_events.py", line 385, in run_until_complete raise RuntimeError('Event loop stopped before Future completed.')RuntimeError: Event loop stopped before Future completed.