cms-gem-daq-project / gem-plotting-tools

Repository for GEM commissioning plotting tools
GNU General Public License v3.0
1 stars 26 forks source link

Error in anaDACScan.py #167

Closed fsimone91 closed 6 years ago

fsimone91 commented 6 years ago

Error while using analysis code

Types of issue

Expected Behavior

Current Behavior

(py2.7) [fsimone@gem904qc8daq GEB3c-l1-w]$ anaDACScan.py /data/bigdisk/GEM-Data-Taking/GE11_QC8/dacScanV3/2018.11.07.12.04/dacScanV3.root --calFileList calFileList_GEB3c-l1-w_ADC0.txt
Analyzing: '/data/bigdisk/GEM-Data-Taking/GE11_QC8/dacScanV3/2018.11.07.12.04/dacScanV3.root'
mkdir: cannot create directory ‘/data/bigdisk/GEM-Data-Taking/GE11_QC8//GE11-X-S-BARI-0010/dacScans/2018.11.07.12.04’: Permission denied
Traceback (most recent call last):
  File "/afs/cern.ch/user/f/fsimone/gemdaq/venv/cc7/py2.7/lib/python2.7/site-packages/gempython/scripts/anaDACScan.py", line 120, in <module>
    from utils.anaInfo import nominalDacValues
  File "/usr/lib64/python2.7/site-packages/ROOT.py", line 318, in _importhook
    return _orig_ihook( name, *args, **kwds )
ImportError: No module named utils.anaInfo

Steps to Reproduce (for bugs)

1. 2. 3. 4.

Possible Solution (for bugs)

Context (for feature requests)

Your Environment

bdorney commented 6 years ago

@AndrewLevin I can see you did not correctly test this inside a venv before submitting this PR. This would have failed immediately from inside a venv due to the line:

    from utils.anaInfo import nominalDacValues

Should definitely be something like:

    from gempython.gemplotting.utils.anaInfo import nominalDacValues

In the future when submitting PR's please test them thoroughly. This includes:

  1. Ensuring the package builds properly, and
  2. Ensuring that after installing the package, either as an rpm or as a pip package in a venv, that the code works inside that env.

This impacts not only sysadmin, but as you see also users.

bdorney commented 6 years ago

Other errors may exist...please resolve ASAP.

AndrewLevin commented 6 years ago

Sorry about this. Here is the bugfix pull request: https://github.com/cms-gem-daq-project/gem-plotting-tools/pull/168