Open
Description
Summary
I've tried to use PYLS on Monaco Editor using Monaco Language Client with the following configuration
this.editor.setModel(monaco.editor.createModel(exampleCode, 'python', monaco.Uri.parse('inmemory://dummy.py')););
const services = createMonacoServices(this.editor);
And everything that this blog explained.
Everything works as expected but the auto complete. When I do ctrl + space
on the editor, there's only "No Suggestions." and I saw the PYLS logs error as follows
PYLS Server: 2017-12-08 09:56:21,029 UTC - ERROR - jsonrpc.manager - API Exception: {'message': "'Folder' object has no attribute 'read'", 'args': ("'Folder' object has no attribute 'read'",), 'type': 'AttributeError'}
Traceback (most recent call last):
File "myVirtualEnv/lib/python2.7/site-packages/jsonrpc/manager.py", line 112, in _get_responses
result = method(*request.args, **request.kwargs)
File "myVirtualEnv/lib/python2.7/site-packages/pyls/language_server.py", line 64, in wrapped
return func(*args, **kwargs)
File "myVirtualEnv/lib/python2.7/site-packages/pyls/python_ls.py", line 140, in m_text_document__completion
return self.completions(textDocument['uri'], position)
File "myVirtualEnv/lib/python2.7/site-packages/pyls/python_ls.py", line 70, in completions
position=position
File "myVirtualEnv/lib/python2.7/site-packages/pyls/_utils.py", line 113, in race_hooks
for impl, result in pool.imap_unordered(_apply, impls, chunksize=1):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 668, in next
raise value
AttributeError: 'Folder' object has no attribute 'read'
Could you help me? is it about the monaco URI that I pass ? inmemory://dummy.py
Metadata
Metadata
Assignees
Labels
No labels