mattyowl / RSSMOSPipeline

Pipeline for reducing both longslit and multi-object spectroscopic data from the Robert Stobie Spectrograph on SALT.
https://rssmospipeline.readthedocs.io
GNU General Public License v3.0
4 stars 2 forks source link

Problem within parso? #14

Closed svw26 closed 3 years ago

svw26 commented 3 years ago

Hiya Matt,

Due to some 'pip problems' I thought I'd start fresh by installing RSSMOSPipeline in a new conda container. The installation (via pip install RSSMOSPipeline within the container) appears to be successful, but I run into the following SyntaxError:

(rssmospipeline_conda) Sarahs-MacBook-Pro-2:2020-1-MLT-008.20210516_G4Jy1268 sarahwhite$ rss_mos_reducer product reduced all
Traceback (most recent call last):
  File "/Users/sarahwhite/anaconda/envs/rssmospipeline_conda/bin/rss_mos_reducer", line 34, in <module>
    from RSSMOSPipeline import RSSMOSTools
  File "/Users/sarahwhite/anaconda/envs/rssmospipeline_conda/lib/python3.5/site-packages/RSSMOSPipeline/__init__.py", line 23, in <module>
    from . import RSSMOSTools
  File "/Users/sarahwhite/anaconda/envs/rssmospipeline_conda/lib/python3.5/site-packages/RSSMOSPipeline/RSSMOSTools.py", line 41, in <module>
    import IPython
  File "/Users/sarahwhite/anaconda/envs/rssmospipeline_conda/lib/python3.5/site-packages/IPython/__init__.py", line 55, in <module>
    from .terminal.embed import embed
  File "/Users/sarahwhite/anaconda/envs/rssmospipeline_conda/lib/python3.5/site-packages/IPython/terminal/embed.py", line 16, in <module>
    from IPython.terminal.interactiveshell import TerminalInteractiveShell
  File "/Users/sarahwhite/anaconda/envs/rssmospipeline_conda/lib/python3.5/site-packages/IPython/terminal/interactiveshell.py", line 32, in <module>
    from .debugger import TerminalPdb, Pdb
  File "/Users/sarahwhite/anaconda/envs/rssmospipeline_conda/lib/python3.5/site-packages/IPython/terminal/debugger.py", line 6, in <module>
    from IPython.core.completer import IPCompleter
  File "/Users/sarahwhite/anaconda/envs/rssmospipeline_conda/lib/python3.5/site-packages/IPython/core/completer.py", line 146, in <module>
    import jedi
  File "/Users/sarahwhite/anaconda/envs/rssmospipeline_conda/lib/python3.5/site-packages/jedi/__init__.py", line 41, in <module>
    from jedi.api import Script, Interpreter, set_debug_function, \
  File "/Users/sarahwhite/anaconda/envs/rssmospipeline_conda/lib/python3.5/site-packages/jedi/api/__init__.py", line 15, in <module>
    import parso
  File "/Users/sarahwhite/anaconda/envs/rssmospipeline_conda/lib/python3.5/site-packages/parso/__init__.py", line 41, in <module>
    from parso.parser import ParserSyntaxError
  File "/Users/sarahwhite/anaconda/envs/rssmospipeline_conda/lib/python3.5/site-packages/parso/parser.py", line 113
    node_map: Dict[str, type] = {}
            ^
SyntaxError: invalid syntax

I'm not familiar with parso...

Thanks, Sarah x

mattyowl commented 3 years ago

Hi Sarah, parso isn't part of RSSMOSPipeline - it seems to be used by IPython, which I use for debugging. So I guess IPython isn't working for you in your new conda installation?

Cheers Matt

svw26 commented 3 years ago

Yeah, it appears so :( It looks like the installation downloads parso 0.8.0, when you actually need parso 0.7.0 for it to still work with Python 3.5 (https://github.com/spyder-ide/spyder/issues/13605). I've done the following to get RSSMOSPipeline output again:

  1. conda uninstall parso -- this also removes ipython and jedi
  2. To get those two back again, just need to conda install ipython
  3. conda install parso=0.7

Thanks, Sarah x