andreikop / enki

A text editor for programmers
http://enki-editor.org
GNU General Public License v2.0
161 stars 39 forks source link

Error launching previewer: ImportError: No module named 'StringIO' #402

Closed richbowen closed 8 years ago

richbowen commented 8 years ago

Error when opening Help->Vim mode tutorial

Fig 1. screenshot_20160311_221224

This is the error in full:

Traceback (most recent call last):
  File "/home/user/Documents/Workspace/enki/bin/../enki/plugins/preview/__init__.py", line 452, in _onDocumentChanged
    self._createDock()
  File "/home/user/Documents/Workspace/enki/bin/../enki/plugins/preview/__init__.py", line 480, in _createDock
    from enki.plugins.preview.preview import PreviewDock
  File "/home/user/Documents/Workspace/enki/bin/../enki/plugins/preview/preview.py", line 47, in <module>
    import CodeChat.CodeToRest as CodeToRest
  File "/home/user/Documents/Workspace/venv/lib/python3.5/site-packages/CodeChat/CodeToRest.py", line 39, in <module>
    from StringIO import StringIO
ImportError: No module named 'StringIO'

According to this, StringIO is no longer available in Python 3, and it appears to be a CodeChat issue.

NOTE: I am working from a venv and running Enki master via ./enki/bin/enki. I think the virtual environment is properly configured but I only get this error in this environment. It works fine on Windows.

bjones1 commented 8 years ago

I assume you're using the latest version of Enki from this repo? If so, would you mind updating to the latest CodeChat via pip install -U CodeChat and trying again?

richbowen commented 8 years ago

I tried that and it says CodeChat is up-to-date

bjones1 commented 8 years ago

Whoops. I haven't released an update to CodeChat in a while. Let me do that. I assume you have v. 1.2.1? (pip show CodeChat)?

richbowen commented 8 years ago

Indeed.

bjones1 commented 8 years ago

OK. the new version should be up. Would you mind updating and trying again?

richbowen commented 8 years ago

Alright, it works fine now.