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

Error using python3.8 and also service factory uses python2.7 #385

Open
hyunlee1o opened this issue Apr 5, 2020 · 4 comments
Open

Error using python3.8 and also service factory uses python2.7 #385

hyunlee1o opened this issue Apr 5, 2020 · 4 comments

Comments

@hyunlee1o
Copy link

hyunlee1o commented Apr 5, 2020

Traceback (most recent call last):
  File "/home/user/.emacs.d/anaconda-mode/0.1.13/service_factory-0.1.5-py2.7.egg/service_factory/service.py", line 101, in apply
    result = method(**params)
  File "<string>", line 99, in wrapper
  File "/home/user/.emacs.d/anaconda-mode/0.1.13/jedi-0.13.1-py2.7.egg/jedi/api/__init__.py", line 95, in __init__
    self._grammar = parso.load_grammar()
  File "/home/user/.emacs.d/anaconda-mode/0.1.13/parso-0.3.1-py2.7.egg/parso/grammar.py", line 250, in load_grammar
    return load_grammar(**kwargs)
  File "/home/user/.emacs.d/anaconda-mode/0.1.13/parso-0.3.1-py2.7.egg/parso/grammar.py", line 246, in load_grammar
    raise NotImplementedError(message)
NotImplementedError: Python version None is currently not supported.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/.emacs.d/anaconda-mode/0.1.13/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/anaconda-mode/0.1.13/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/anaconda-mode/0.1.13/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/anaconda-mode/0.1.13/service_factory-0.1.5-py2.7.egg/service_factory/errors.py", line 91, in server_error
    raise ServiceException(500, dumps(response))
service_factory.exceptions.ServiceException: (500, '{"jsonrpc": "2.0", "id": 1, "error": {"code": -32000, "message": "Server error", "data": "NotImplementedError(\'Python version None is currently not supported.\')"}}')

@dakra
Copy link
Member

dakra commented Jun 22, 2020

Is this still an issue?
I'm running anaconda (and service_factory) with python 3.8 myself fine.

@gdevanla
Copy link

gdevanla commented Aug 19, 2020

I see the same error. Any tips on resolving this would be much appreciated. I am on emacs-26.3

anaconda_mode port 42597                                                                                                                                                                                            
127.0.0.1 - - [19/Aug/2020 11:08:25] ================================================================================                                                                                               
Traceback (most recent call last):                                                                                                                                                                                  
  File "/home/user/.emacs.d/anaconda-mode/0.1.13/parso-0.3.1-py3.5.egg/parso/grammar.py", line 236, in load_grammar                                                                                                 
    return _loaded_grammars[path]                                                                                                                                                                                   
KeyError: '/home/user/.emacs.d/anaconda-mode/0.1.13/parso-0.3.1-py3.5.egg/parso/python/grammar38.txt'                                                                                                               
                                                                                                                                                                                                                    
During handling of the above exception, another exception occurred:                                                                                                                                                 
                                                                                                                                                                                                                    
Traceback (most recent call last):                                                                                                                                                                                  
  File "/home/user/.emacs.d/anaconda-mode/0.1.13/parso-0.3.1-py3.5.egg/parso/grammar.py", line 239, in load_grammar                                                                                                 
    with open(path) as f:                                                                                                                                                                                           
FileNotFoundError: [Errno 2] No such file or directory: '/home/user/.emacs.d/anaconda-mode/0.1.13/parso-0.3.1-py3.5.egg/parso/python/grammar38.txt'                                                                 
                                                                                                                                                                                                                    
During handling of the above exception, another exception occurred:                                                                                                                                                 
                                                                                                                                                                                                                    
Traceback (most recent call last):                                                                                                                                                                                  
  File "/home/user/.emacs.d/anaconda-mode/0.1.13/service_factory-0.1.5-py3.5.egg/service_factory/service.py", line 101, in apply                                                                                    
    result = method(**params)                                                                                                                                                                                       
  File "<string>", line 99, in wrapper                                                                                                                                                                              
  File "/home/user/.emacs.d/anaconda-mode/0.1.13/jedi-0.13.2-py3.5.egg/jedi/api/__init__.py", line 95, in __init__                                                                                                  
    self._grammar = parso.load_grammar()                                                                                                                                                                            
  File "/home/user/.emacs.d/anaconda-mode/0.1.13/parso-0.3.1-py3.5.egg/parso/grammar.py", line 250, in load_grammar                                                                                                 
    return load_grammar(**kwargs)                                                                                                                                                                                   
  File "/home/user/.emacs.d/anaconda-mode/0.1.13/parso-0.3.1-py3.5.egg/parso/grammar.py", line 246, in load_grammar                                                                                                 
    raise NotImplementedError(message)                                                                                                                                                                              
NotImplementedError: Python version None is currently not supported.                                                                                                                                                
                                                                                                                                                                                                                    
During handling of the above exception, another exception occurred:                                                                                                                                                 
                                                                                                                                                                                                                    
Traceback (most recent call last):                                                                                                                                                                                  
  File "/home/user/.emacs.d/anaconda-mode/0.1.13/service_factory-0.1.5-py3.5.egg/service_factory/providers/basehttp.py", line 40, in do_POST                                                                        
    status, response = self.server.service(data)                                                                                                                                                                    
  File "/home/user/.emacs.d/anaconda-mode/0.1.13/service_factory-0.1.5-py3.5.egg/service_factory/service.py", line 50, in __call__                                                                                  
    result = self.apply(method, args)                                                                                                                                                                               
  File "/home/user/.emacs.d/anaconda-mode/0.1.13/service_factory-0.1.5-py3.5.egg/service_factory/service.py", line 105, in apply                                                                                    
    server_error(args['id'], error)                                                                                                                                                                                 
  File "/home/user/.emacs.d/anaconda-mode/0.1.13/service_factory-0.1.5-py3.5.egg/service_factory/errors.py", line 91, in server_error                                                                               
    raise ServiceException(500, dumps(response))                                                                                                                                                                    
service_factory.exceptions.ServiceException: (500, '{"jsonrpc": "2.0", "id": 1, "error": {"code": -32000, "message": "Server error", "data": "NotImplementedError(\'Python version None is currently not supported.\
\')"}}')                                                                                                                                                                                                            
                                  

@gdevanla
Copy link

gdevanla commented Aug 19, 2020

Wanted to leave a note on how I resolved this issue: I removed anaconda installation from ~/.emacs.d. (Not sure why this folder was retained inspite of me deleting the package from Emacs.)

After deleting the package and removing the folder, I start Emacs with python env set to Python 3.8. That way, when anaconda runs the installation it is able to install packages for 3.8. Now, I am not sure if this approach breaks compatibility with projects that need Python 3.7.

@ryukinix
Copy link

ryukinix commented Sep 1, 2020

Thank you for sharing your solution @gdevanla, I did the same thing here and worked.

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

No branches or pull requests

4 participants