Skip to content
This repository was archived by the owner on Jan 31, 2022. It is now read-only.
This repository was archived by the owner on Jan 31, 2022. It is now read-only.

Debugging scripts fails with the gemlogger: Permission denied: '/tmp/gempython.log' #259

@BenjaminRS

Description

@BenjaminRS

Brief summary of issue

As part of attempting to implement vfatqc-python-scripts#224 I am testing some new code. The code failed but instead of getting useful feedback I received a message stating the gemlogger having permission errors.

Types of issue

  • Bug report (report an issue with the code)
  • Feature request (request for change which adds functionality)

Expected Behavior

Expected tho see the debugging output on where python is failing.

Current Behavior

Instead I currently get his back:

Traceback (most recent call last):
File "/afs/cern.ch/user/b/benjamin/GEMDev/TestConn/venv/cc7/py2.7/lib/python2.7/site-packages/gempython/scripts/testConnectivity.py", line 868, in
gemlogger = getGEMLogger(name)
File "/afs/cern.ch/user/b/benjamin/GEMDev/TestConn/venv/cc7/py2.7/lib/python2.7/site-packages/gempython/utils/gemlogger.py", line 180, in getGEMLogger
logging.config.fileConfig(logcfg, disable_existing_loggers=False)
File "/usr/lib64/python2.7/logging/config.py", line 78, in fileConfig
handlers = _install_handlers(cp, formatters)
File "/usr/lib64/python2.7/logging/config.py", line 156, in _install_handlers
h = klass(*args)
File "/usr/lib64/python2.7/logging/init.py", line 902, in init
StreamHandler.init(self, self._open())
File "/usr/lib64/python2.7/logging/init.py", line 925, in _open
stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: '/tmp/gempython.log'

Steps to Reproduce (for bugs)

Edit code in cmsgemos/gempython which will fail due to an issue in python.

Possible Solution (for bugs)

(Brian:) Modify utils/gemlogging_config.cfg and change args=("/tmp/gempython.log", 'a') to args=("/tmp/username/gempython.log", 'a').
A longer term solution would be if this somehow used $USER of the active user.

Context

Your Environment

  • Version used: branch generic-amc-RPC-v3-short-term
  • Shell used: bash

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions