Closed iparask closed 3 years ago
I think the problem is that your workdir is /
- the default location is ./
already, so specifying ./
as path will result in the same error.
(ve3) rivendell merzky //tmp $ cd /
(ve3) rivendell merzky / $ python -c 'import radical.analytics'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/merzky/radical/radical.analytics.devel/ve3/lib/python3.8/site-packages/radical/analytics/__init__.py", line 24, in <module>
logger = ru.Logger('radical.analytics')
File "/home/merzky/radical/radical.analytics.devel/ve3/lib/python3.8/site-packages/radical/utils/logger.py", line 286, in __init__
elif t in ['.'] : h = FSHandler("%s/%s.log" % (p, n))
File "/home/merzky/radical/radical.analytics.devel/ve3/lib/python3.8/site-packages/radical/utils/logger.py", line 174, in __init__
logging.FileHandler.__init__(self, target)
File "/usr/lib/python3.8/logging/__init__.py", line 1143, in __init__
StreamHandler.__init__(self, self._open())
File "/usr/lib/python3.8/logging/__init__.py", line 1172, in _open
return open(self.baseFilename, self.mode, encoding=self.encoding)
PermissionError: [Errno 13] Permission denied: '//radical.analytics.log'
(ve3) rivendell merzky / 1 $ cd /tmp/
(ve3) rivendell merzky //tmp $ python -c 'import radical.analytics'
(ve3) rivendell merzky //tmp $ l radical.analytics.log
-rw-rw-r-- 1 merzky merzky 294 Jul 31 22:50 radical.analytics.log
So this error happened only with the Jupyter notebook and not when I tried to import it through python interpreter. My path was not /
fortunately!
I made the following change locally and it worked:
logger = ru.Logger('radical.analytics', path=os.getcwd())
It may have to do with how a notebook launches on a Mac.
The default log dir is set here - maybe $PWD
is not set in your shell env?
@iparask I do not have that issue on Mac with notebooks.
@iparask should we close this or do you still have that issue?
I am using a Jupiter notebook to import radical.analyitcs and I am getting the following error:
Would it make sense to specify the path the logger writes as
./
?