Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • P pyOPALTools
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 8
    • Issues 8
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 1
    • Merge requests 1
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • OPAL
  • pyOPALTools
  • Issues
  • #66

Closed
Open
Created Oct 09, 2019 by ext-neveu_n@ext-neveu_nDeveloper

setup.py update?

While using pyOPALTools with a Steve Hudson at ANL, he got an import/path error related to yaml:

  File "deap_libe_lcls_gun.py", line 37, in <module>
    from fitness import fitness_opal
  File "/lcrc/project/MCS-SLAC/shudson/emittance_minimization/code/fitness.py", line 17, in <module>
    from libEopal import run_opal_nowatch
  File "/lcrc/project/MCS-SLAC/shudson/emittance_minimization/code/libEopal.py", line 9, in <module>
    from opal.datasets.StatDataset import *
  File "/lcrc/project/MCS-SLAC/software/pyOPALTools/opal/__init__.py", line 1, in <module>
    from .opal import load_dataset
  File "/lcrc/project/MCS-SLAC/software/pyOPALTools/opal/opal.py", line 6, in <module>
    from .datasets.filetype import FileType
  File "/lcrc/project/MCS-SLAC/software/pyOPALTools/opal/datasets/__init__.py", line 1, in <module>
    import opal.datasets.filetype
  File "/lcrc/project/MCS-SLAC/software/pyOPALTools/opal/datasets/filetype.py", line 9, in <module>
    from opal.utilities.logger import opal_logger
  File "/lcrc/project/MCS-SLAC/software/pyOPALTools/opal/utilities/__init__.py", line 1, in <module>
    import opal.utilities.logger
  File "/lcrc/project/MCS-SLAC/software/pyOPALTools/opal/utilities/logger.py", line 28, in <module>
    with open(path, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'opal/utilities/log.yaml'

He suggested: "adding a package_data clause to the setup.py, that may make the import pick up yaml files.
For example in libensemble I use this:
package_data={'libensemble.sim_funcs.branin': ['known_minima_and_func_values']},
to pick up the data file known_minima_and_func_values.
In any case, the PYTHONPATH approach seems to work too."

Does this make sense to do here? Thanks!

Assignee
Assign to
Time tracking