Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server error: IOError(2, 'No such file or directory') #307

Closed
Mafeuser opened this issue Jun 25, 2018 · 8 comments
Closed

Server error: IOError(2, 'No such file or directory') #307

Mafeuser opened this issue Jun 25, 2018 · 8 comments

Comments

@Mafeuser
Copy link

On my centos7 + emacs 25.3 (compilation from source), I've just installed newest spacemacs, then enabled python layer and auto-completion layer (company mode).

Just for experimetns I've also installed ycmd layer and visited its global_conf.py file.
When I'm going to complete something within this file I get the error mention is subject.

For example I'm going to before last line, press enter and start typing:
new_fl with the hope to have completion of new_flags.

anaconda_mode buffer looks like following:

Searching for jedi>=0.12
Reading https://pypi.python.org/simple/jedi/
Best match: jedi 0.12.0
Downloading https://files.pythonhosted.org/packages/ff/c9/781449489b743c67ad063e33aa68139afaa8a1a5bc348eee9f5cab39b4e1/jedi-0.12.0.tar.gz#sha256=1972f694c6bc66a2fac8718299e2ab73011d653a6d8059790c3476d2353b99ad
Processing jedi-0.12.0.tar.gz
Writing /tmp/easy_install-SE1GgB/jedi-0.12.0/setup.cfg
Running jedi-0.12.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-SE1GgB/jedi-0.12.0/egg-dist-tmp-LlZQoQ
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
  warnings.warn(msg)
warning: no files found matching 'jedi/parser/python/grammar*.txt'
warning: no previously-included files matching '*.pyc' found under directory '*'
zip_safe flag not set; analyzing archive contents...
jedi.__main__: module references __file__
jedi.evaluate.pep0484: module references __file__
jedi.evaluate.context.module: module references __file__
jedi.evaluate.compiled.mixed: module MAY be using inspect.getsourcefile
jedi.evaluate.compiled.fake: module references __file__
jedi.evaluate.compiled.access: module references __file__
jedi.evaluate.compiled.subprocess.__init__: module references __file__
jedi.evaluate.compiled.subprocess.__main__: module references __file__
Adding jedi 0.12.0 to easy-install.pth file

Installed /home/user/.emacs.d/.cache/anaconda-mode/0.1.12/jedi-0.12.0-py2.7.egg
Processing dependencies for jedi>=0.12
Searching for parso>=0.2.0
Reading https://pypi.python.org/simple/parso/
Best match: parso 0.2.1
Downloading https://files.pythonhosted.org/packages/4b/86/bc857ddcc892968b954620f18ce90a943368ee9fe84595911501da898798/parso-0.2.1.tar.gz#sha256=f0604a40b96e062b0fd99cf134cc2d5cdf66939d0902f8267d938b0d5b26707f
Processing parso-0.2.1.tar.gz
Writing /tmp/easy_install-0BGbVH/parso-0.2.1/setup.cfg
Running parso-0.2.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-0BGbVH/parso-0.2.1/egg-dist-tmp-KRQY3t
warning: no previously-included files matching '*.pyc' found under directory '*'
zip_safe flag not set; analyzing archive contents...
parso.grammar: module references __file__
Adding parso 0.2.1 to easy-install.pth file

Installed /home/user/.emacs.d/.cache/anaconda-mode/0.1.12/parso-0.2.1-py2.7.egg
Processing dependencies for parso>=0.2.0
Finished processing dependencies for parso>=0.2.0
Finished processing dependencies for jedi>=0.12
Searching for service-factory>=0.1.5
Reading https://pypi.python.org/simple/service_factory/
Best match: service-factory 0.1.5
Downloading https://files.pythonhosted.org/packages/d1/32/bacd539bc748af613082f8cf80c82311373a05bb4af2d43bc2ff5bbdcdcc/service_factory-0.1.5.tar.gz#sha256=3f23f6e1a59eb2657eff48be5ee42e4cbd8f90eb3d134eab0017e13c54f6e3f7
Processing service_factory-0.1.5.tar.gz
Writing /tmp/easy_install-A417KG/service_factory-0.1.5/setup.cfg
Running service_factory-0.1.5/setup.py -q bdist_egg --dist-dir /tmp/easy_install-A417KG/service_factory-0.1.5/egg-dist-tmp-pt4_i1
Adding service-factory 0.1.5 to easy-install.pth file

Installed /home/user/.emacs.d/.cache/anaconda-mode/0.1.12/service_factory-0.1.5-py2.7.egg
Processing dependencies for service-factory>=0.1.5
Finished processing dependencies for service-factory>=0.1.5
anaconda_mode port 40244
127.0.0.1 - - [25/Jun/2018 15:20:29] ================================================================================
Traceback (most recent call last):
  File "/home/user/.emacs.d/.cache/anaconda-mode/0.1.12/service_factory-0.1.5-py2.7.egg/service_factory/providers/basehttp.py", line 40, in do_POST
    status, response = self.server.service(data)
  File "/home/user/.emacs.d/.cache/anaconda-mode/0.1.12/service_factory-0.1.5-py2.7.egg/service_factory/service.py", line 50, in __call__
    result = self.apply(method, args)
  File "/home/user/.emacs.d/.cache/anaconda-mode/0.1.12/service_factory-0.1.5-py2.7.egg/service_factory/service.py", line 105, in apply
    server_error(args['id'], error)
  File "/home/user/.emacs.d/.cache/anaconda-mode/0.1.12/service_factory-0.1.5-py2.7.egg/service_factory/errors.py", line 91, in server_error
    raise ServiceException(500, dumps(response))
ServiceException: (500, '{"jsonrpc": "2.0", "id": 1, "error": {"message": "Server error", "code": -32000, "data": "IOError(2, \'No such file or directory\')"}}')
127.0.0.1 - - [25/Jun/2018 15:20:30] ================================================================================
Traceback (most recent call last):
  File "/home/user/.emacs.d/.cache/anaconda-mode/0.1.12/service_factory-0.1.5-py2.7.egg/service_factory/providers/basehttp.py", line 40, in do_POST
    status, response = self.server.service(data)
  File "/home/user/.emacs.d/.cache/anaconda-mode/0.1.12/service_factory-0.1.5-py2.7.egg/service_factory/service.py", line 50, in __call__
    result = self.apply(method, args)
  File "/home/user/.emacs.d/.cache/anaconda-mode/0.1.12/service_factory-0.1.5-py2.7.egg/service_factory/service.py", line 105, in apply
    server_error(args['id'], error)
  File "/home/user/.emacs.d/.cache/anaconda-mode/0.1.12/service_factory-0.1.5-py2.7.egg/service_factory/errors.py", line 91, in server_error
    raise ServiceException(500, dumps(response))
ServiceException: (500, '{"jsonrpc": "2.0", "id": 1, "error": {"message": "Server error", "code": -32000, "data": "IOError(2, \'No such file or directory\')"}}')
127.0.0.1 - - [25/Jun/2018 15:22:52] ================================================================================
Traceback (most recent call last):
  File "/home/user/.emacs.d/.cache/anaconda-mode/0.1.12/service_factory-0.1.5-py2.7.egg/service_factory/providers/basehttp.py", line 40, in do_POST
    status, response = self.server.service(data)
  File "/home/user/.emacs.d/.cache/anaconda-mode/0.1.12/service_factory-0.1.5-py2.7.egg/service_factory/service.py", line 50, in __call__
    result = self.apply(method, args)
  File "/home/user/.emacs.d/.cache/anaconda-mode/0.1.12/service_factory-0.1.5-py2.7.egg/service_factory/service.py", line 105, in apply
    server_error(args['id'], error)
  File "/home/user/.emacs.d/.cache/anaconda-mode/0.1.12/service_factory-0.1.5-py2.7.egg/service_factory/errors.py", line 91, in server_error
    raise ServiceException(500, dumps(response))
ServiceException: (500, '{"jsonrpc": "2.0", "id": 1, "error": {"message": "Server error", "code": -32000, "data": "IOError(2, \'No such file or directory\')"}}')
127.0.0.1 - - [25/Jun/2018 15:32:13] ================================================================================
Traceback (most recent call last):
  File "/home/user/.emacs.d/.cache/anaconda-mode/0.1.12/service_factory-0.1.5-py2.7.egg/service_factory/providers/basehttp.py", line 40, in do_POST
    status, response = self.server.service(data)
  File "/home/user/.emacs.d/.cache/anaconda-mode/0.1.12/service_factory-0.1.5-py2.7.egg/service_factory/service.py", line 50, in __call__
    result = self.apply(method, args)
  File "/home/user/.emacs.d/.cache/anaconda-mode/0.1.12/service_factory-0.1.5-py2.7.egg/service_factory/service.py", line 105, in apply
    server_error(args['id'], error)
  File "/home/user/.emacs.d/.cache/anaconda-mode/0.1.12/service_factory-0.1.5-py2.7.egg/service_factory/errors.py", line 91, in server_error
    raise ServiceException(500, dumps(response))
ServiceException: (500, '{"jsonrpc": "2.0", "id": 1, "error": {"message": "Server error", "code": -32000, "data": "IOError(2, \'No such file or directory\')"}}')

python version used is 2.7.5, but I've also tried to use 2.7.15 (through 2.7.15) and problem persists.
please help

@proofit404
Copy link
Contributor

Hi, can you add log statements like we do in #295 (comment) ?

@Mafeuser
Copy link
Author

@proofit404, here is the log.
It goes from another OS and python version installed in the system: xubuntu.18.04 and python 2.7.15rc. The rest is the same, including the problem.

Today I've also done one more step:

pip install json-rpc

version 1.11.0 was installed. I didn't help though.

the anaconda-mode after that looks like that:

Searching for hunter
Best match: hunter 2.0.2
Processing hunter-2.0.2-py2.7-linux-x86_64.egg
hunter 2.0.2 is already the active version in easy-install.pth
Installing hunter-trace script to /home/noone/.emacs.d/.cache/anaconda-mode/0.1.12

Installed /home/noone/.emacs.d/.cache/anaconda-mode/0.1.12/hunter-2.0.2-py2.7-linux-x86_64.egg
Processing dependencies for hunter
Searching for six==1.11.0
Best match: six 1.11.0
Processing six-1.11.0-py2.7.egg
six 1.11.0 is already the active version in easy-install.pth

Installed /home/noone/.emacs.d/.cache/anaconda-mode/0.1.12/six-1.11.0-py2.7.egg
Processing dependencies for six==1.11.0
Finished processing dependencies for six==1.11.0
Searching for fields==5.0.0
Best match: fields 5.0.0
Processing fields-5.0.0-py2.7.egg
fields 5.0.0 is already the active version in easy-install.pth

Installed /home/noone/.emacs.d/.cache/anaconda-mode/0.1.12/fields-5.0.0-py2.7.egg
Processing dependencies for fields==5.0.0
Finished processing dependencies for fields==5.0.0
Searching for colorama==0.3.9
Best match: colorama 0.3.9
Processing colorama-0.3.9-py2.7.egg
colorama 0.3.9 is already the active version in easy-install.pth

Installed /home/noone/.emacs.d/.cache/anaconda-mode/0.1.12/colorama-0.3.9-py2.7.egg
Processing dependencies for colorama==0.3.9
Finished processing dependencies for colorama==0.3.9
Finished processing dependencies for hunter
[...]y2.7.egg/service_factory/factory.py:19    call      => service_factory(app=[<function complete at 0x7fdf7af5eb90>, <function company_complete at 0x7fdf7af5ec80>, <function show_doc at 0x7fdf7af5ed70>, <function goto_definitions at 0x7fdf7af5eed8>, <function goto_assignments at 0x7fdf7af630c8>, <function usages at 0x7fdf7af63230>, <function eldoc at 0x7fdf7af63320>], host='127.0.0.1', port=0, report_message='anaconda_mode port {port}', provider_cls=<class service_factory.providers.basehttp.HTTPServiceProvider at 0x7fdf7b4b9808>)
[...]y2.7.egg/service_factory/factory.py:32    line         service = Service(app)
[...]y2.7.egg/service_factory/service.py:25    call         => __init__(self=<service_factory.service.Service object at 0x7fdf7af5d7d0>, app=[<function complete at 0x7fdf7af5eb90>, <function company_complete at 0x7fdf7af5ec80>, <function show_doc at 0x7fdf7af5ed70>, <function goto_definitions at 0x7fdf7af5eed8>, <function goto_assignments at 0x7fdf7af630c8>, <function usages at 0x7fdf7af63230>, <function eldoc at 0x7fdf7af63320>])
[...]y2.7.egg/service_factory/service.py:33    line            if isinstance(app, list):
[...]y2.7.egg/service_factory/service.py:34    line            self.app = dict((method.__name__, method) for method in app)
[...]y2.7.egg/service_factory/service.py:34    call            => <genexpr>(.0=<listiterator object at 0x7fdf7af5db50>)
[...]y2.7.egg/service_factory/service.py:34    line               self.app = dict((method.__name__, method) for method in app)
[...]y2.7.egg/service_factory/service.py:34    return          <= <genexpr>: ('complete', <function complete at 0x7fdf7af5eb90>)
[...]y2.7.egg/service_factory/service.py:34    call            => <genexpr>(.0=<listiterator object at 0x7fdf7af5db50>)
[...]y2.7.egg/service_factory/service.py:34    line               self.app = dict((method.__name__, method) for method in app)
[...]y2.7.egg/service_factory/service.py:34    return          <= <genexpr>: ('company_complete', <function company_complete at 0x7fdf7af5ec80>)
[...]y2.7.egg/service_factory/service.py:34    call            => <genexpr>(.0=<listiterator object at 0x7fdf7af5db50>)
[...]y2.7.egg/service_factory/service.py:34    line               self.app = dict((method.__name__, method) for method in app)
[...]y2.7.egg/service_factory/service.py:34    return          <= <genexpr>: ('show_doc', <function show_doc at 0x7fdf7af5ed70>)
[...]y2.7.egg/service_factory/service.py:34    call            => <genexpr>(.0=<listiterator object at 0x7fdf7af5db50>)
[...]y2.7.egg/service_factory/service.py:34    line               self.app = dict((method.__name__, method) for method in app)
[...]y2.7.egg/service_factory/service.py:34    return          <= <genexpr>: ('goto_definitions', <function goto_definitions at 0x7fdf7af5eed8>)
[...]y2.7.egg/service_factory/service.py:34    call            => <genexpr>(.0=<listiterator object at 0x7fdf7af5db50>)
[...]y2.7.egg/service_factory/service.py:34    line               self.app = dict((method.__name__, method) for method in app)
[...]y2.7.egg/service_factory/service.py:34    return          <= <genexpr>: ('goto_assignments', <function goto_assignments at 0x7fdf7af630c8>)
[...]y2.7.egg/service_factory/service.py:34    call            => <genexpr>(.0=<listiterator object at 0x7fdf7af5db50>)
[...]y2.7.egg/service_factory/service.py:34    line               self.app = dict((method.__name__, method) for method in app)
[...]y2.7.egg/service_factory/service.py:34    return          <= <genexpr>: ('usages', <function usages at 0x7fdf7af63230>)
[...]y2.7.egg/service_factory/service.py:34    call            => <genexpr>(.0=<listiterator object at 0x7fdf7af5db50>)
[...]y2.7.egg/service_factory/service.py:34    line               self.app = dict((method.__name__, method) for method in app)
[...]y2.7.egg/service_factory/service.py:34    return          <= <genexpr>: ('eldoc', <function eldoc at 0x7fdf7af63320>)
[...]y2.7.egg/service_factory/service.py:34    call            => <genexpr>(.0=<listiterator object at 0x7fdf7af5db50>)
[...]y2.7.egg/service_factory/service.py:34    line               self.app = dict((method.__name__, method) for method in app)
[...]y2.7.egg/service_factory/service.py:34    return          <= <genexpr>: None
[...]y2.7.egg/service_factory/service.py:34    return       <= __init__: None
[...]y2.7.egg/service_factory/factory.py:33    line         server = provider_cls(service, host, port, report_message)
[...]rvice_factory/providers/basehttp.py:58    call         => __init__(self=<service_factory.providers.basehttp.HTTPServiceProvider instance at 0x7fdf7af58ab8>, service=<service_factory.service.Service object at 0x7fdf7af5d7d0>, host='127.0.0.1', port=0, report_message='anaconda_mode port {port}')
[...]rvice_factory/providers/basehttp.py:61    line            self.service = service
[...]rvice_factory/providers/basehttp.py:62    line            self.host = host
[...]rvice_factory/providers/basehttp.py:63    line            self.port = port
[...]rvice_factory/providers/basehttp.py:64    line            self.report_message = report_message
[...]rvice_factory/providers/basehttp.py:65    line            self.bind()
[...]rvice_factory/providers/basehttp.py:68    call            => bind(self=<service_factory.providers.basehttp.HTTPServiceProvider instance at 0x7fdf7af58ab8>)
[...]rvice_factory/providers/basehttp.py:71    line               HTTPServer.__init__(self, (self.host, self.port), HTTPRequestHandler)
[...]rvice_factory/providers/basehttp.py:72    line               self.port = self.server_port
[...]rvice_factory/providers/basehttp.py:72    return          <= bind: None
[...]rvice_factory/providers/basehttp.py:66    line            self.report()
[...]rvice_factory/providers/basehttp.py:74    call            => report(self=<service_factory.providers.basehttp.HTTPServiceProvider instance at 0x7fdf7af58ab8>)
[...]rvice_factory/providers/basehttp.py:77    line               print(
[...]rvice_factory/providers/basehttp.py:78    line               self.report_message.format(
[...]rvice_factory/providers/basehttp.py:79    line               service=self.service,
[...]rvice_factory/providers/basehttp.py:80    line               host=self.host,
[...]rvice_factory/providers/basehttp.py:81    line               port=self.port,
anaconda_mode port 40539
[...]rvice_factory/providers/basehttp.py:84    line               sys.stdout.flush()
[...]rvice_factory/providers/basehttp.py:84    return          <= report: None
[...]rvice_factory/providers/basehttp.py:66    return       <= __init__: None
[...]y2.7.egg/service_factory/factory.py:34    line         server.serve_forever()
[...]rvice_factory/providers/basehttp.py:34    call         => do_POST(self=<service_factory.providers.basehttp.HTTPRequestHandler instance at 0x7fdf7af66440>)
[...]rvice_factory/providers/basehttp.py:35    line            try:
[...]rvice_factory/providers/basehttp.py:36    line            content_len = self.headers.get('content-length')
[...]rvice_factory/providers/basehttp.py:37    line            if content_len and content_len.isdigit():
[...]rvice_factory/providers/basehttp.py:38    line            raw_data = self.rfile.read(int(content_len))
[...]rvice_factory/providers/basehttp.py:39    line            data = raw_data.decode('utf-8')
[...]rvice_factory/providers/basehttp.py:40    line            status, response = self.server.service(data)
[...]y2.7.egg/service_factory/service.py:38    call            => __call__(self=<service_factory.service.Service object at 0x7fdf7af5d7d0>, arg=u'{"jsonrpc":"2.0","id":1,"method":"company_complete","params":{"source":"# global_conf.py --- ycmd global configuration file for Spacemacs\\n#\\n# Copyright (c) 2012-2018 Sylvain Benner & Contributors\\n#\\n# Author: Thomas de Beauchene <thomas.de.beauchene@gmail.com>\\n# URL: https://github.com/syl20bnr/spacemacs\\n#\\n# This file is not part of GNU Emacs.\\n#\\n# License: GPLv3\\n#\\n# This script tries to get the compilation flags for a translation unit using\\n# the following logic:\\n#\\n# 1) If there [...] ysroot=\' ]:\\n            if flag == path_flag:\\n                make_next_absolute = True\\n                break\\n            if flag.startswith(path_flag):\\n                path = flag[ len(path_flag): ]\\n                new_flag = path_flag + os.path.join(working_directory, path)\\n                break\\n        if new_flag:\\n            new_flags.append(new_flag)\\n            new\\n    return new_flags\\n","line":293,"column":15,"path":"/home/noone/.emacs.d/layers/+tools/ycmd/global_conf.py"}}')
[...]y2.7.egg/service_factory/service.py:47    line               args = self.load_args(arg)
[...]y2.7.egg/service_factory/service.py:54    call               => load_args(self=<service_factory.service.Service object at 0x7fdf7af5d7d0>, arg=u'{"jsonrpc":"2.0","id":1,"method":"company_complete","params":{"source":"# global_conf.py --- ycmd global configuration file for Spacemacs\\n#\\n# Copyright (c) 2012-2018 Sylvain Benner & Contributors\\n#\\n# Author: Thomas de Beauchene <thomas.de.beauchene@gmail.com>\\n# URL: https://github.com/syl20bnr/spacemacs\\n#\\n# This file is not part of GNU Emacs.\\n#\\n# License: GPLv3\\n#\\n# This script tries to get the compilation flags for a translation unit using\\n# the following logic:\\n#\\n# 1) If there [...] ysroot=\' ]:\\n            if flag == path_flag:\\n                make_next_absolute = True\\n                break\\n            if flag.startswith(path_flag):\\n                path = flag[ len(path_flag): ]\\n                new_flag = path_flag + os.path.join(working_directory, path)\\n                break\\n        if new_flag:\\n            new_flags.append(new_flag)\\n            new\\n    return new_flags\\n","line":293,"column":15,"path":"/home/noone/.emacs.d/layers/+tools/ycmd/global_conf.py"}}')
[...]y2.7.egg/service_factory/service.py:62    line                  try:
[...]y2.7.egg/service_factory/service.py:63    line                  args = loads(arg)
[...]y2.7.egg/service_factory/service.py:67    line                  return args
[...]y2.7.egg/service_factory/service.py:67    return             <= load_args: {u'params': {u'column': 15, u'source': u'# global_conf.py --- ycmd global configuration file for Spacemacs\n#\n# Copyright (c) 2012-2018 Sylvain Benner & Contributors\n#\n# Author: Thomas de Beauchene <thomas.de.beauchene@gmail.com>\n# URL: https://github.com/syl20bnr/spacemacs\n#\n# This file is not part of GNU Emacs.\n#\n# License: GPLv3\n#\n# This script tries to get the compilation flags for a translation unit using\n# the following logic:\n#\n# 1) If there is a compile_commands.json in a parent directo [...] ag:\n                make_next_absolute = True\n                break\n            if flag.startswith(path_flag):\n                path = flag[ len(path_flag): ]\n                new_flag = path_flag + os.path.join(working_directory, path)\n                break\n        if new_flag:\n            new_flags.append(new_flag)\n            new\n    return new_flags\n', u'line': 293, u'path': u'/home/noone/.emacs.d/layers/+tools/ycmd/global_conf.py'}, u'jsonrpc': u'2.0', u'id': 1, u'method': u'company_complete'}
[...]y2.7.egg/service_factory/service.py:48    line               self.validate(args)
[...]y2.7.egg/service_factory/service.py:69    call               => validate(self=<service_factory.service.Service object at 0x7fdf7af5d7d0>, request={u'params': {u'column': 15, u'source': u'# global_conf.py --- ycmd global configuration file for Spacemacs\n#\n# Copyright (c) 2012-2018 Sylvain Benner & Contributors\n#\n# Author: Thomas de Beauchene <thomas.de.beauchene@gmail.com>\n# URL: https://github.com/syl20bnr/spacemacs\n#\n# This file is not part of GNU Emacs.\n#\n# License: GPLv3\n#\n# This script tries to get the compilation flags for a translation unit using\n# the following logic:\n#\n# 1) If there is a compile_commands.json in a parent directo [...] ag:\n                make_next_absolute = True\n                break\n            if flag.startswith(path_flag):\n                path = flag[ len(path_flag): ]\n                new_flag = path_flag + os.path.join(working_directory, path)\n                break\n        if new_flag:\n            new_flags.append(new_flag)\n            new\n    return new_flags\n', u'line': 293, u'path': u'/home/noone/.emacs.d/layers/+tools/ycmd/global_conf.py'}, u'jsonrpc': u'2.0', u'id': 1, u'method': u'company_complete'})
[...]y2.7.egg/service_factory/service.py:77    line                  try:
[...]y2.7.egg/service_factory/service.py:78    line                  validate_version(request)
[...]7.egg/service_factory/validation.py:18    call                  => validate_version(request={u'params': {u'column': 15, u'source': u'# global_conf.py --- ycmd global configuration file for Spacemacs\n#\n# Copyright (c) 2012-2018 Sylvain Benner & Contributors\n#\n# Author: Thomas de Beauchene <thomas.de.beauchene@gmail.com>\n# URL: https://github.com/syl20bnr/spacemacs\n#\n# This file is not part of GNU Emacs.\n#\n# License: GPLv3\n#\n# This script tries to get the compilation flags for a translation unit using\n# the following logic:\n#\n# 1) If there is a compile_commands.json in a parent directo [...] ag:\n                make_next_absolute = True\n                break\n            if flag.startswith(path_flag):\n                path = flag[ len(path_flag): ]\n                new_flag = path_flag + os.path.join(working_directory, path)\n                break\n        if new_flag:\n            new_flags.append(new_flag)\n            new\n    return new_flags\n', u'line': 293, u'path': u'/home/noone/.emacs.d/layers/+tools/ycmd/global_conf.py'}, u'jsonrpc': u'2.0', u'id': 1, u'method': u'company_complete'})
[...]7.egg/service_factory/validation.py:21    line                     correct_version = request['jsonrpc'] == '2.0'
[...]7.egg/service_factory/validation.py:22    line                     error = 'Incorrect version of the JSON-RPC protocol'
[...]7.egg/service_factory/validation.py:23    line                     assert correct_version, error
[...]7.egg/service_factory/validation.py:23    return                <= validate_version: None
[...]y2.7.egg/service_factory/service.py:79    line                  validate_method(request)
[...]7.egg/service_factory/validation.py:26    call                  => validate_method(request={u'params': {u'column': 15, u'source': u'# global_conf.py --- ycmd global configuration file for Spacemacs\n#\n# Copyright (c) 2012-2018 Sylvain Benner & Contributors\n#\n# Author: Thomas de Beauchene <thomas.de.beauchene@gmail.com>\n# URL: https://github.com/syl20bnr/spacemacs\n#\n# This file is not part of GNU Emacs.\n#\n# License: GPLv3\n#\n# This script tries to get the compilation flags for a translation unit using\n# the following logic:\n#\n# 1) If there is a compile_commands.json in a parent directo [...] ag:\n                make_next_absolute = True\n                break\n            if flag.startswith(path_flag):\n                path = flag[ len(path_flag): ]\n                new_flag = path_flag + os.path.join(working_directory, path)\n                break\n        if new_flag:\n            new_flags.append(new_flag)\n            new\n    return new_flags\n', u'line': 293, u'path': u'/home/noone/.emacs.d/layers/+tools/ycmd/global_conf.py'}, u'jsonrpc': u'2.0', u'id': 1, u'method': u'company_complete'})
[...]7.egg/service_factory/validation.py:29    line                     correct_method = isinstance(request['method'], string_types)
[...]7.egg/service_factory/validation.py:30    line                     error = 'Incorrect name of the method to be invoked'
[...]7.egg/service_factory/validation.py:31    line                     assert correct_method, error
[...]7.egg/service_factory/validation.py:31    return                <= validate_method: None
[...]y2.7.egg/service_factory/service.py:80    line                  validate_params(request)
[...]7.egg/service_factory/validation.py:34    call                  => validate_params(request={u'params': {u'column': 15, u'source': u'# global_conf.py --- ycmd global configuration file for Spacemacs\n#\n# Copyright (c) 2012-2018 Sylvain Benner & Contributors\n#\n# Author: Thomas de Beauchene <thomas.de.beauchene@gmail.com>\n# URL: https://github.com/syl20bnr/spacemacs\n#\n# This file is not part of GNU Emacs.\n#\n# License: GPLv3\n#\n# This script tries to get the compilation flags for a translation unit using\n# the following logic:\n#\n# 1) If there is a compile_commands.json in a parent directo [...] ag:\n                make_next_absolute = True\n                break\n            if flag.startswith(path_flag):\n                path = flag[ len(path_flag): ]\n                new_flag = path_flag + os.path.join(working_directory, path)\n                break\n        if new_flag:\n            new_flags.append(new_flag)\n            new\n    return new_flags\n', u'line': 293, u'path': u'/home/noone/.emacs.d/layers/+tools/ycmd/global_conf.py'}, u'jsonrpc': u'2.0', u'id': 1, u'method': u'company_complete'})
[...]7.egg/service_factory/validation.py:37    line                     if 'params' in request:
[...]7.egg/service_factory/validation.py:38    line                     correct_params = isinstance(request['params'], (list, dict))
[...]7.egg/service_factory/validation.py:39    line                     error = 'Incorrect parameter values'
[...]7.egg/service_factory/validation.py:40    line                     assert correct_params, error
[...]7.egg/service_factory/validation.py:40    return                <= validate_params: None
[...]y2.7.egg/service_factory/service.py:81    line                  validate_id(request)
[...]7.egg/service_factory/validation.py:43    call                  => validate_id(request={u'params': {u'column': 15, u'source': u'# global_conf.py --- ycmd global configuration file for Spacemacs\n#\n# Copyright (c) 2012-2018 Sylvain Benner & Contributors\n#\n# Author: Thomas de Beauchene <thomas.de.beauchene@gmail.com>\n# URL: https://github.com/syl20bnr/spacemacs\n#\n# This file is not part of GNU Emacs.\n#\n# License: GPLv3\n#\n# This script tries to get the compilation flags for a translation unit using\n# the following logic:\n#\n# 1) If there is a compile_commands.json in a parent directo [...] ag:\n                make_next_absolute = True\n                break\n            if flag.startswith(path_flag):\n                path = flag[ len(path_flag): ]\n                new_flag = path_flag + os.path.join(working_directory, path)\n                break\n        if new_flag:\n            new_flags.append(new_flag)\n            new\n    return new_flags\n', u'line': 293, u'path': u'/home/noone/.emacs.d/layers/+tools/ycmd/global_conf.py'}, u'jsonrpc': u'2.0', u'id': 1, u'method': u'company_complete'})
[...]7.egg/service_factory/validation.py:46    line                     if 'id' in request:
[...]7.egg/service_factory/validation.py:47    line                     correct_id = isinstance(
[...]7.egg/service_factory/validation.py:48    line                     request['id'],
[...]7.egg/service_factory/validation.py:49    line                     (string_types, int, None),
[...]7.egg/service_factory/validation.py:51    line                     error = 'Incorrect identifier'
[...]7.egg/service_factory/validation.py:52    line                     assert correct_id, error
[...]7.egg/service_factory/validation.py:52    return                <= validate_id: None
[...]y2.7.egg/service_factory/service.py:81    return             <= validate: None
[...]y2.7.egg/service_factory/service.py:49    line               method = self.get_method(args)
[...]y2.7.egg/service_factory/service.py:85    call               => get_method(self=<service_factory.service.Service object at 0x7fdf7af5d7d0>, args={u'params': {u'column': 15, u'source': u'# global_conf.py --- ycmd global configuration file for Spacemacs\n#\n# Copyright (c) 2012-2018 Sylvain Benner & Contributors\n#\n# Author: Thomas de Beauchene <thomas.de.beauchene@gmail.com>\n# URL: https://github.com/syl20bnr/spacemacs\n#\n# This file is not part of GNU Emacs.\n#\n# License: GPLv3\n#\n# This script tries to get the compilation flags for a translation unit using\n# the following logic:\n#\n# 1) If there is a compile_commands.json in a parent directo [...] ag:\n                make_next_absolute = True\n                break\n            if flag.startswith(path_flag):\n                path = flag[ len(path_flag): ]\n                new_flag = path_flag + os.path.join(working_directory, path)\n                break\n        if new_flag:\n            new_flags.append(new_flag)\n            new\n    return new_flags\n', u'line': 293, u'path': u'/home/noone/.emacs.d/layers/+tools/ycmd/global_conf.py'}, u'jsonrpc': u'2.0', u'id': 1, u'method': u'company_complete'})
[...]y2.7.egg/service_factory/service.py:88    line                  try:
[...]y2.7.egg/service_factory/service.py:89    line                  method = self.app[args['method']]
[...]y2.7.egg/service_factory/service.py:93    line                  return method
[...]y2.7.egg/service_factory/service.py:93    return             <= get_method: <function company_complete at 0x7fdf7af5ec80>
[...]y2.7.egg/service_factory/service.py:50    line               result = self.apply(method, args)
[...]y2.7.egg/service_factory/service.py:95    call               => apply(self=<service_factory.service.Service object at 0x7fdf7af5d7d0>, method=<function company_complete at 0x7fdf7af5ec80>, args={u'params': {u'column': 15, u'source': u'# global_conf.py --- ycmd global configuration file for Spacemacs\n#\n# Copyright (c) 2012-2018 Sylvain Benner & Contributors\n#\n# Author: Thomas de Beauchene <thomas.de.beauchene@gmail.com>\n# URL: https://github.com/syl20bnr/spacemacs\n#\n# This file is not part of GNU Emacs.\n#\n# License: GPLv3\n#\n# This script tries to get the compilation flags for a translation unit using\n# the following logic:\n#\n# 1) If there is a compile_commands.json in a parent directo [...] ag:\n                make_next_absolute = True\n                break\n            if flag.startswith(path_flag):\n                path = flag[ len(path_flag): ]\n                new_flag = path_flag + os.path.join(working_directory, path)\n                break\n        if new_flag:\n            new_flags.append(new_flag)\n            new\n    return new_flags\n', u'line': 293, u'path': u'/home/noone/.emacs.d/layers/+tools/ycmd/global_conf.py'}, u'jsonrpc': u'2.0', u'id': 1, u'method': u'company_complete'})
[...]y2.7.egg/service_factory/service.py:98    line                  try:
[...]y2.7.egg/service_factory/service.py:99    line                  params = args['params']
[...]y2.7.egg/service_factory/service.py:100   line                  if isinstance(params, dict):
[...]y2.7.egg/service_factory/service.py:101   line                  result = method(**params)
[...]y2.7.egg/service_factory/service.py:101   exception           ! apply: (<type 'exceptions.IOError'>, IOError(2, 'No such file or directory'), <traceback object at 0x7fdf79e97320>)
[...]y2.7.egg/service_factory/service.py:104   line                  except Exception as error:
[...]y2.7.egg/service_factory/service.py:105   line                  server_error(args['id'], error)
[...]py2.7.egg/service_factory/errors.py:72    call                  => server_error(request_id=1, error=IOError(2, 'No such file or directory'))
[...]py2.7.egg/service_factory/errors.py:82    line                     response = {
[...]py2.7.egg/service_factory/errors.py:83    line                     'jsonrpc': '2.0',
[...]py2.7.egg/service_factory/errors.py:84    line                     'id': request_id,
[...]py2.7.egg/service_factory/errors.py:85    line                     'error': {
[...]py2.7.egg/service_factory/errors.py:86    line                     'code': -32000,
[...]py2.7.egg/service_factory/errors.py:87    line                     'message': 'Server error',
[...]py2.7.egg/service_factory/errors.py:88    line                     'data': repr(error),
[...]py2.7.egg/service_factory/errors.py:91    line                     raise ServiceException(500, dumps(response))
[...]py2.7.egg/service_factory/errors.py:91    exception              ! server_error: (<class 'service_factory.exceptions.ServiceException'>, ServiceException(500, '{"jsonrpc": "2.0", "id": 1, "error": {"message": "Server error", "code": -32000, "data": "IOError(2, \'No such file or directory\')"}}'), <traceback object at 0x7fdf79e97710>)
[...]py2.7.egg/service_factory/errors.py:91    return                <= server_error: None
[...]y2.7.egg/service_factory/service.py:105   exception           ! apply: (<class 'service_factory.exceptions.ServiceException'>, ServiceException(500, '{"jsonrpc": "2.0", "id": 1, "error": {"message": "Server error", "code": -32000, "data": "IOError(2, \'No such file or directory\')"}}'), <traceback object at 0x7fdf79e976c8>)
[...]y2.7.egg/service_factory/service.py:105   return             <= apply: None
[...]y2.7.egg/service_factory/service.py:50    exception        ! __call__: (<class 'service_factory.exceptions.ServiceException'>, ServiceException(500, '{"jsonrpc": "2.0", "id": 1, "error": {"message": "Server error", "code": -32000, "data": "IOError(2, \'No such file or directory\')"}}'), <traceback object at 0x7fdf7b17bb90>)
[...]y2.7.egg/service_factory/service.py:50    return          <= __call__: None
[...]rvice_factory/providers/basehttp.py:40    exception     ! do_POST: (<class 'service_factory.exceptions.ServiceException'>, ServiceException(500, '{"jsonrpc": "2.0", "id": 1, "error": {"message": "Server error", "code": -32000, "data": "IOError(2, \'No such file or directory\')"}}'), <traceback object at 0x7fdf7afc2128>)
[...]rvice_factory/providers/basehttp.py:43    line            except ServiceException as error:
[...]rvice_factory/providers/basehttp.py:44    line            self.log_error('=' * 80)
127.0.0.1 - - [30/Jun/2018 14:52:05] ================================================================================
[...]rvice_factory/providers/basehttp.py:45    line            print_exc()
Traceback (most recent call last):
  File "/home/noone/.emacs.d/.cache/anaconda-mode/0.1.12/service_factory-0.1.5-py2.7.egg/service_factory/providers/basehttp.py", line 40, in do_POST
    status, response = self.server.service(data)
  File "/home/noone/.emacs.d/.cache/anaconda-mode/0.1.12/service_factory-0.1.5-py2.7.egg/service_factory/service.py", line 50, in __call__
    result = self.apply(method, args)
  File "/home/noone/.emacs.d/.cache/anaconda-mode/0.1.12/service_factory-0.1.5-py2.7.egg/service_factory/service.py", line 105, in apply
    server_error(args['id'], error)
  File "/home/noone/.emacs.d/.cache/anaconda-mode/0.1.12/service_factory-0.1.5-py2.7.egg/service_factory/errors.py", line 91, in server_error
    raise ServiceException(500, dumps(response))
ServiceException: (500, '{"jsonrpc": "2.0", "id": 1, "error": {"message": "Server error", "code": -32000, "data": "IOError(2, \'No such file or directory\')"}}')
[...]rvice_factory/providers/basehttp.py:46    line            status, response = error.args
[...]rvice_factory/providers/basehttp.py:48    line            response = response.encode('utf-8')
[...]rvice_factory/providers/basehttp.py:49    line            self.send_response(status)
[...]rvice_factory/providers/basehttp.py:29    call            => log_request(self=<service_factory.providers.basehttp.HTTPRequestHandler instance at 0x7fdf7af66440>)
[...]rvice_factory/providers/basehttp.py:32    line               pass
[...]rvice_factory/providers/basehttp.py:32    return          <= log_request: None
[...]rvice_factory/providers/basehttp.py:50    line            self.send_header("Content-Length", len(response))
[...]rvice_factory/providers/basehttp.py:51    line            self.end_headers()
[...]rvice_factory/providers/basehttp.py:52    line            self.wfile.write(response)
[...]rvice_factory/providers/basehttp.py:52    return       <= do_POST: None

@proofit404
Copy link
Contributor

Can you include trace from jedi library with module__startswith='jedi' argument in the hunter.trace call?

@proofit404
Copy link
Contributor

pip install json-rpc

This library is not needed to work, I don't know why you install it.

@Mafeuser
Copy link
Author

Mafeuser commented Jul 8, 2018

when the following hunter.trace modification is introduced:

hunter.trace(
    hunter.Q(
        module__startswith='service_factory'
    ) | hunter.Q(
        module='http.server'
    ) | hunter.Q(
        module='socketserver'
    ) | hunter.Q(
        module__startswith='jedi'
    )
)

it leads to infinite loop until memory is exhauted. anaconda-mode buffer grows on an on.

anmodejedi.log

I've installed json-rpc because spacemacs python layer documentation is probably inacurate and tells to install json-rpc in case "some" problems occur during usage of anaconda-mode as backend, and the error log in anaconda-mode mentioned json-rpc, but I didn't find it installed on my system, that's why I've just thought to install it.

@Mafeuser
Copy link
Author

@proofit404, any news with that matter?
regards

@proofit404
Copy link
Contributor

I completely overwhelmed on work. Sorry, no progress so far.

@CeleritasCelery
Copy link
Contributor

@Mafeuser is this still an issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants