avanwinkle / masseffect2

Mass Effect 2 Pinball game for Mission Pinball Framework
15 stars 1 forks source link

Receiving 'NoneType' object has no attribute 'close' error on startup #1

Open SheldonSheldon opened 5 years ago

SheldonSheldon commented 5 years ago

Hi,

Super excited to see what you have built. I'm trying to run masseffect2 in a virtual machine. Does it require to be connected to an actual pinball machine for the code to work?

Here's the output from running it:

mpf game -t INFO : Machine : Mission Pinball Framework Core Engine v0.51.3 INFO : Machine : Command line arguments: {'production': False, 'text_ui': False, 'loglevel': 15, 'bcp': True, 'mpfconfigfile': '/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/mpfconfig.yaml', 'configfile': ['config.yaml'], 'pause': False, 'force_platform': None, 'logfile': 'logs/2019-01-20-22-03-04-mpf-xxx-MacBook-Pro.local.log', 'no_load_cache': False, 'create_config_cache': True, 'jsonlogging': False, 'syslog_address': None, 'no_sound': False, 'force_assets_load': False, 'consoleloglevel': 20, 'mc_file_name': None} INFO : Machine : MPF path: /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf INFO : Machine : Machine path: /Users/xxx/Downloads/masseffect2-master INFO : Machine : Platform: darwin INFO : Machine : Python executable location: /Library/Frameworks/Python.framework/Versions/3.5/bin/python3 INFO : Machine : Python version: 3.5.1 (64-bit) INFO : Machine : Machine config file #1: config.yaml INFO : ConfigProcessor : Loading config from cache: /var/folders/rt/1jbmhhld1db5swv7gx2_pgjh0000gn/T/5b06688d092709fda5baeaf96f908a23.mpf_cache INFO : Machine : Initialise MPF. INFO : Spike : Connecting to /dev/tty.usbserial-FTA6MU05 at 115200bps ERROR : root : 'NoneType' object has no attribute 'close' Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/commands/game.py", line 220, in init MachineController(mpf_path, machine_path, vars(self.args)).run() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/core/machine.py", line 699, in run self.initialise_mpf() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/core/machine.py", line 692, in initialise_mpf self.shutdown() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/core/machine.py", line 728, in shutdown self._platform_stop() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/core/machine.py", line 753, in _platform_stop hardware_platform.stop() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/platforms/spike/spike.py", line 564, in stop self._writer.close() AttributeError: 'NoneType' object has no attribute 'close'

Thanks!

SheldonSheldon commented 5 years ago

I get this error when I run the following: mpf game -t -X

Output: INFO : Machine : Mission Pinball Framework Core Engine v0.51.3 I clipped a bunch of lines ERROR : asyncio : Exception in callback EventManager._async_handler_done()(<Task finishe...at switch.",)>) at /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/core/events.py:96 handle: <Handle EventManager._async_handler_done()(<Task finishe...at switch.",)>) at /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/core/events.py:96> 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 99, in _async_handler_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/device_manager.py", line 117, in _load_device_modules yield from self.initialize_devices() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/core/device_manager.py", line 214, in initialize_devices yield from 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 17, in device_added_system_wide yield from self._initialize() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/devices/autofire.py", line 73, in _initialize self.config['playfield'].name), 1) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/core/logging.py", line 139, in raise_config_error raise ConfigFileError(msg, error_no, self.log.name, context) mpf.exceptions.ConfigFileError.ConfigFileError: Config File Error in autofire.right_bumper: Autofire device 'right_bumper' uses switch 's_bumper_right' which has a 'playfield_active' tag. This is handled internally by the device. Remove the redundant 'playfield_active' tag from that switch. Error Code: CFE-autofire.right_bumper-1 ERROR : root : Exception is not set. Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/commands/game.py", line 220, in init MachineController(mpf_path, machine_path, vars(self.args)).run() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/core/machine.py", line 699, in run self.initialise_mpf() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/core/machine.py", line 691, in initialise_mpf if init.exception(): File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/futures.py", line 288, in exception raise InvalidStateError('Exception is not set.') asyncio.futures.InvalidStateError: Exception is not set.

SheldonSheldon commented 5 years ago

Ok, I figured this out by changing the machine types and other settings in the config file.