_psposix.py file has EOL issue


Hi I recently found my octoprint was no longer working. In checking the log I found the below error:
Could not initialize environment detector: EOL while scanning string literal (_psposix.py, line 21)

I was able to open the file with nano, and it appears I am missing more than just a quotation mark:

__all__ = ['pid_exists', 'wait_pid', 'disk_usage', ement", 

Could someone who has their system working open their _psposix.py file and let me know what is supposed to come before ement"? I am assuming it is a partial word. I am hoping to avoid reimaging if I can fix the issue with a couple letters.


Please share the full logs for context.

2018-12-09 18:44:25,056 - octoprint.startup - INFO - ******************************************************************************
2018-12-09 18:44:25,065 - octoprint.startup - INFO - Starting OctoPrint 1.3.9
2018-12-09 18:44:25,067 - octoprint.startup - INFO - ******************************************************************************
2018-12-09 18:44:25,238 - octoprint.util.connectivity_checker - INFO - Connectivity changed from offline to online
2018-12-09 18:44:26,480 - octoprint.startup - INFO - Blacklist processing done, adding 1 blacklisted plugin versions: roomtemp (any)
2018-12-09 18:44:26,635 - octoprint.plugin.core - INFO - Loading plugins from /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins, /home/pi/.octoprint/plugins and installed plugin pack
2018-12-09 18:44:34,901 - octoprint.plugin.core - INFO - Found 11 plugin(s) providing 11 mixin implementations, 8 hook handlers
2018-12-09 18:44:35,145 - octoprint.startup - CRITICAL - Could not initialize environment detector: EOL while scanning string literal (_psposix.py, line 21)
2018-12-09 18:44:35,151 - octoprint.startup - CRITICAL - There was a fatal error starting up OctoPrint.


Weird, it doesn't give the full path. But it looks like that must be part of psutil. It wouldn't get randomly corrupted, so I'd be suspicious. Here's that line in the source, you could try patching it but I wouldn't be surprised if there are more problems.


Looking at what I have vs the source, I am thinking a reimage is in order. Very strange. Thank you for your help.