﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	notify_on_close	platform	project
4068	Programmer documentation missing atomic and map_data classes	Tom Goddard	Tom Goddard	"Lots of ChimeraX APIs such as Atoms are Atom are not in the programming documentation because Sphinx fails to import atomic.  The problem is that Sphinx uses python3.8 to import atomic and it fails due to not finding libarrays.dylib.  The chimerax.map module also cannot be imported without starting the ChimeraX app for the same reason, although that one seems to get documented, probably because the order of imports done by Sphinx get the libarrays.dylib loaded before hand.

Here is the traceback trying to import atomic

/Users/pett/src/chimerax/ChimeraX.app/Contents/bin/python3.8 -I /Users/pett/rm/test.py
Traceback (most recent call last):
  File ""/Users/pett/rm/test.py"", line 1, in <module>
    import chimerax.atomic
  File ""/Users/pett/src/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/chimerax/atomic/__init__.py"", line 15, in <module>
    import chimerax.atomic_lib
  File ""/Users/pett/src/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/chimerax/atomic_lib/__init__.py"", line 27, in <module>
    from . import _load_libs
ImportError: dlopen(/Users/pett/src/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/chimerax/atomic_lib/_load_libs.cpython-38-darwin.so, 2): Library not loaded: @rpath/libarrays.dylib
  Referenced from: /Users/pett/src/chimerax/ChimeraX.app/Contents/lib/python3.8/site-packages/chimerax/atomic_lib/lib/libatomstruct.dylib
  Reason: image not found

Here is the traceback trying to import map

$ ~/ucsf/chimerax/ChimeraX.app/Contents/bin/python3.8
Python 3.8.5 (default, Dec  2 2020, 20:24:01) 
[Clang 12.0.0 (clang-1200.0.32.27)] on darwin
Type ""help"", ""copyright"", ""credits"" or ""license"" for more information.
>>> import chimerax.map
Traceback (most recent call last):
  File ""<stdin>"", line 1, in <module>
  File ""/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/chimerax/map/__init__.py"", line 31, in <module>
    from ._map import contour_surface, sphere_surface_distance
ImportError: dlopen(/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/chimerax/map/_map.cpython-38-darwin.so, 2): Library not loaded: @rpath/libarrays.dylib
  Referenced from: /Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/chimerax/map/_map.cpython-38-darwin.so
  Reason: image not found
>>> "	defect	closed	major		Documentation		fixed		Eric Pettersen Greg Couch				all	ChimeraX
