Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
P pyOPALTools
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 8
    • Issues 8
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 1
    • Merge requests 1
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Code Review
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • OPAL
  • pyOPALTools
  • Issues
  • #83

Closed
Open
Created May 27, 2020 by snuverink_j@snuverink_jDeveloper

Documentation: import opal error for jupyter notebooks

The jupyter notebooks (e.g. http://amas.web.psi.ch/docs/pyOPALTools/Cyclotron.html) have import errors:

from opal.opal import load_dataset, filetype

ds = load_dataset('./../../tests/testData/', ftype=filetype.TRACK_ORBIT)
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-2f139e8985fc> in <module>
----> 1 from opal.opal import load_dataset, filetype

ModuleNotFoundError: No module named 'opal'

The jupyter notebooks are generated by nbsphinx, but this doesn't copy the sys.path from sphinx, but only the environment variables, so the PYTHONPATH should be set in the main script conf.py. See also the documentation: https://nbsphinx.readthedocs.io/en/0.7.0/configuring-kernels.html#Environment-Variables

Edited May 29, 2020 by snuverink_j
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking