Hi, I'm new here, trying to develop some plugins for a Marlin printer. I followed the instructions on the plugin tutorial. However, I am getting some errors when using the command "octoprint serve" that I don't know how to resolve. They all trace back to "ERROR - Error detecting python version." I am running WSL on Windows. Here are the error messages:
2019-07-09 16:28:48,525 - octoprint.environment - ERROR - Error detecting python version
Traceback (most recent call last):
File "/mnt/c/OctoPrint/src/octoprint/environment.py", line 78, in _detect_python
result["version"] = get_python_version_string()
File "/mnt/c/OctoPrint/src/octoprint/util/version.py", line 126, in get_python_version_string
version_string = python_version[:-1]
TypeError: 'function' object has no attribute '__getitem__'
2019-07-09 16:28:48,529 - octoprint.environment - ERROR - Error while detecting hardware environment
Traceback (most recent call last):
File "/mnt/c/OctoPrint/src/octoprint/environment.py", line 105, in _detect_hardware
cpu_freq = psutil.cpu_freq()
File "/mnt/c/OctoPrint/venv/local/lib/python2.7/site-packages/psutil/__init__.py", line 1985, in cpu_freq
ret = _psplatform.cpu_freq()
File "/mnt/c/OctoPrint/venv/local/lib/python2.7/site-packages/psutil/_pslinux.py", line 698, in cpu_freq
"can't find current frequency file")
NotImplementedError: can't find current frequency file
2019-07-09 16:28:48,537 - octoprint.environment - INFO - Detected environment is Python unknown under Linux (linux2). Details:
| hardware:
| cores: unknown
| freq: unknown
| ram: unknown
| os:
| id: linux
| platform: linux2
| python:
| pip: 19.1.1
| version: unknown
| virtualenv: /mnt/c/OctoPrint/venv
2019-07-09 16:28:48,546 - octoprint.server - INFO - Reset webasset folder /home/tonypan/.octoprint/generated/webassets...
2019-07-09 16:28:48,550 - octoprint.server - INFO - Reset webasset folder /home/tonypan/.octoprint/generated/.webassets-cache...
2019-07-09 16:28:48,787 - octoprint.server - INFO - Shutting down intermediary server...
2019-07-09 16:28:49,270 - octoprint.server - INFO - Intermediary server shut down
2019-07-09 16:28:49,272 - octoprint.events - INFO - Processing startup event, this is our first event
2019-07-09 16:28:49,274 - octoprint.events - INFO - Adding 0 events to queue that were held back before startup event
2019-07-09 16:28:49,275 - octoprint.filemanager - INFO - Adding backlog items from all storage types to analysis queue...
2019-07-09 16:28:49,277 - octoprint.server.util.watchdog - INFO - Running initial scan on watched folder...
2019-07-09 16:28:49,279 - octoprint.filemanager - INFO - Added 0 items from storage type "local" to analysis queue
2019-07-09 16:28:49,280 - octoprint.server.util.watchdog - INFO - ... initial scan done.
2019-07-09 16:28:49,285 - octoprint.plugins.discovery - INFO - Registered OctoPrint instance on DESKTOP-BB020B0 for SSDP
2019-07-09 16:28:49,286 - octoprint.server - INFO - Listening on http://0.0.0.0:5000 and http://[::]:5000
2019-07-09 16:28:49,302 - octoprint.plugins.pluginmanager - INFO - Loaded plugin repository data from disk, was still valid
2019-07-09 16:28:49,517 - octoprint.plugins.pluginmanager - INFO - Loaded notice data from disk, was still valid
2019-07-09 16:28:50,472 - octoprint.util.pip - INFO - Using "/mnt/c/OctoPrint/venv/bin/python -m pip" as command to invoke pip
2019-07-09 16:28:50,473 - octoprint.util.pip - INFO - pip installs to /mnt/c/OctoPrint/venv/lib/python2.7/site-packages (writable -> yes), --user flag needed -> no, virtual env -> yes
2019-07-09 16:28:50,474 - octoprint.util.pip - INFO - ==> pip ok -> yes
2019-07-09 16:28:50,474 - octoprint.plugin - ERROR - Error while calling plugin softwareupdate
Traceback (most recent call last):
File "/mnt/c/OctoPrint/src/octoprint/plugin/__init__.py", line 219, in call_plugin
result = getattr(plugin, method)(*args, **kwargs)
File "/mnt/c/OctoPrint/src/octoprint/plugins/softwareupdate/__init__.py", line 102, in on_after_startup
self._check_environment()
File "/mnt/c/OctoPrint/src/octoprint/plugins/softwareupdate/__init__.py", line 184, in _check_environment
versions = dict(python=get_python_version_string(),
File "/mnt/c/OctoPrint/src/octoprint/util/version.py", line 126, in get_python_version_string
version_string = python_version[:-1]
TypeError: 'function' object has no attribute '__getitem__'