marvin
marvin copied to clipboard
An issue after intall new version of marvin for MPL-10
Describe the bug I installed new version marvin for MPL-10. I could not import marvin in python. This issue seems to be same as one of the below post. I would like to add the error message and result of "check_marvin" on terminal to help you.
This is the check list when "check_marvin" on terminal.
System Checks Your Python Version: 3.6.9 Full Version: 3.6.9 (default, Apr 18 2020, 01:56:04) [GCC 8.4.0]
OS Checks Platform: linux Full info: posix.uname_result(sysname='Linux', nodename='astrotoy-Inspiron-5675', release='4.15.0-54-generic', version='#58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019', machine='x86_64')
Distribution Checks Is Python from Anaconda or Miniconda? False
Package Checks In /home/astrotoy/.local/lib/python3.6/site-packages/matplotlib/mpl-data/stylelib/_classic_test.mplstyle: The text.latex.preview rcparam was deprecated in Matplotlib 3.3 and will be removed two minor releases later. In /home/astrotoy/.local/lib/python3.6/site-packages/matplotlib/mpl-data/stylelib/_classic_test.mplstyle: The mathtext.fallback_to_cm rcparam was deprecated in Matplotlib 3.3 and will be removed two minor releases later. In /home/astrotoy/.local/lib/python3.6/site-packages/matplotlib/mpl-data/stylelib/_classic_test.mplstyle: Support for setting the 'mathtext.fallback_to_cm' rcParam is deprecated since 3.3 and will be removed two minor releases later; use 'mathtext.fallback : 'cm' instead. In /home/astrotoy/.local/lib/python3.6/site-packages/matplotlib/mpl-data/stylelib/_classic_test.mplstyle: The validate_bool_maybe_none function was deprecated in Matplotlib 3.3 and will be removed two minor releases later. In /home/astrotoy/.local/lib/python3.6/site-packages/matplotlib/mpl-data/stylelib/_classic_test.mplstyle: The savefig.jpeg_quality rcparam was deprecated in Matplotlib 3.3 and will be removed two minor releases later. In /home/astrotoy/.local/lib/python3.6/site-packages/matplotlib/mpl-data/stylelib/_classic_test.mplstyle: The keymap.all_axes rcparam was deprecated in Matplotlib 3.3 and will be removed two minor releases later. In /home/astrotoy/.local/lib/python3.6/site-packages/matplotlib/mpl-data/stylelib/_classic_test.mplstyle: The animation.avconv_path rcparam was deprecated in Matplotlib 3.3 and will be removed two minor releases later. In /home/astrotoy/.local/lib/python3.6/site-packages/matplotlib/mpl-data/stylelib/_classic_test.mplstyle: The animation.avconv_args rcparam was deprecated in Matplotlib 3.3 and will be removed two minor releases later. Numpy version: 1.19.2 Matplotlib version: 3.3.2 Your Matplotlib backend is GTK3Agg
Netrc Checks Have a .netrc file? True Netrc with permissions 600? True
Marvin Checks
INFO: No release version set. Setting default to DR15
/home/astrotoy/.local/lib/python3.6/site-packages/marvin/__init__.py:391: MarvinUserWarning: path /home/astrotoy/sas/mangawork/manga/spectro/redux/v2_4_3/drpall-v2_4_3.fits cannot be found. Setting drpall to None.
.format(value), MarvinUserWarning)
/home/astrotoy/.local/lib/python3.6/site-packages/marvin/__init__.py:404: MarvinUserWarning: path /home/astrotoy/sas/mangawork/manga/spectro/analysis/v2_4_3/2.2.1/dapall-v2_4_3-2.2.1.fits cannot be found. Setting dapall to None.
.format(value), MarvinUserWarning)
Traceback (most recent call last):
File "/home/astrotoy/.local/bin/check_marvin", line 63, in <module>
import marvin
File "/home/astrotoy/.local/lib/python3.6/site-packages/marvin/__init__.py", line 791, in <module>
config = MarvinConfig()
File "/home/astrotoy/.local/lib/python3.6/site-packages/marvin/__init__.py", line 118, in __init__
self._plantTree()
File "/home/astrotoy/.local/lib/python3.6/site-packages/marvin/__init__.py", line 678, in _plantTree
self._tree = Tree(key='MANGA', config=tree_config)
File "/home/astrotoy/.local/lib/python3.6/site-packages/tree/tree.py", line 62, in __init__
self.branch_out(limb=self.key)
File "/home/astrotoy/.local/lib/python3.6/site-packages/tree/tree.py", line 164, in branch_out
options = self._cfg.options(leaf)
File "/usr/lib/python3.6/configparser.py", line 675, in options
raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'GENERAL'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/astrotoy/.local/bin/check_marvin", line 66, in <module>
raise ImportError('Marvin cannot be imported! {0}\n{1}'.format(e, traceback))
ImportError: Marvin cannot be imported! No section: 'GENERAL'
<traceback object at 0x7f20c0785988>
Sentry is attempting to send 1 pending error messages
Waiting up to 10 seconds
Press Ctrl-C to quit
The following is the error message when I import marvin in python
In [1]: import marvin
INFO: No release version set. Setting default to DR15
/home/astrotoy/.local/lib/python3.6/site-packages/marvin/__init__.py:391: MarvinUserWarning: path /home/astrotoy/sas/mangawork/manga/spectro/redux/v2_4_3/drpall-v2_4_3.fits cannot be found. Setting drpall to None.
.format(value), MarvinUserWarning)
/home/astrotoy/.local/lib/python3.6/site-packages/marvin/__init__.py:404: MarvinUserWarning: path /home/astrotoy/sas/mangawork/manga/spectro/analysis/v2_4_3/2.2.1/dapall-v2_4_3-2.2.1.fits cannot be found. Setting dapall to None.
.format(value), MarvinUserWarning)
NoSectionError Traceback (most recent call last)
<ipython-input-1-86893d82dac6> in <module>
----> 1 import marvin
~/.local/lib/python3.6/site-packages/marvin/__init__.py in <module>
789
790
--> 791 config = MarvinConfig()
792 # up to here - time: 1.6 seconds
793
~/.local/lib/python3.6/site-packages/marvin/__init__.py in __init__(self)
116
117 # setup some paths
--> 118 self._plantTree()
119 self._checkSDSSAccess()
120 self._check_manga_dirs()
~/.local/lib/python3.6/site-packages/marvin/__init__.py in _plantTree(self)
676 self._tree = None
677 else:
--> 678 self._tree = Tree(key='MANGA', config=tree_config)
679
680 def _checkSDSSAccess(self):
~/.local/lib/python3.6/site-packages/tree/tree.py in __init__(self, *args, **kwargs)
60 self.set_roots(uproot_with=uproot_with)
61 self.load_config()
---> 62 self.branch_out(limb=self.key)
63 # add the general directories
64 if self.key is not None:
~/.local/lib/python3.6/site-packages/tree/tree.py in branch_out(self, limb)
162 leaf = leaf if leaf in self._cfg.sections() else leaf.upper()
163 self.environ[leaf] = OrderedDict()
--> 164 options = self._cfg.options(leaf)
165
166 for opt in options:
/usr/lib/python3.6/configparser.py in options(self, section)
673 opts = self._sections[section].copy()
674 except KeyError:
--> 675 raise NoSectionError(section) from None
676 opts.update(self._defaults)
677 return list(opts.keys())
NoSectionError: No section: 'GENERAL'
@mj-astrotoy ok thanks, I'll take a look. What version of marvin did you have before? And you just ran pip install -U sdss-marvin
, correct?
@mj-astrotoy Can you do the following in an python session and tell me what it says?
import tree
tree.__file__
It looks like you might be using a standalone package of sdss-tree
. If that's the case can you try running pip install -U sdss-tree
and pip install -U sdss-access
and trying again?