DrSAR / SARlabpy

git clone git@pfeifer.phas.ubc.ca:SARlabpy (do not push to github, please)
http://code.SARlab.ca
Other
1 stars 0 forks source link

importing sarpy results in an awful permissions error! #366

Closed firasm closed 8 years ago

firasm commented 8 years ago

PermissionErrorTraceback (most recent call last)
/home/stefan/anaconda3/lib/python3.5/logging/config.py in configure(self)
    557                     try:
--> 558                         handler = self.configure_handler(handlers[name])
    559                         handler.name = name

/home/stefan/anaconda3/lib/python3.5/logging/config.py in configure_handler(self, config)
    730         try:
--> 731             result = factory(**kwargs)
    732         except TypeError as te:

/home/stefan/anaconda3/lib/python3.5/logging/handlers.py in __init__(self, filename, mode, maxBytes, backupCount, encoding, delay)
    149             mode = 'a'
--> 150         BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)
    151         self.maxBytes = maxBytes

/home/stefan/anaconda3/lib/python3.5/logging/handlers.py in __init__(self, filename, mode, encoding, delay)
     56         """
---> 57         logging.FileHandler.__init__(self, filename, mode, encoding, delay)
     58         self.mode = mode

/home/stefan/anaconda3/lib/python3.5/logging/__init__.py in __init__(self, filename, mode, encoding, delay)
   1007         else:
-> 1008             StreamHandler.__init__(self, self._open())
   1009 

/home/stefan/anaconda3/lib/python3.5/logging/__init__.py in _open(self)
   1036         """
-> 1037         return open(self.baseFilename, self.mode, encoding=self.encoding)
   1038 

PermissionError: [Errno 13] Permission denied: '/tmp/sarpy.errors.log'

During handling of the above exception, another exception occurred:

ValueErrorTraceback (most recent call last)
<ipython-input-1-820512db72ec> in <module>()
----> 1 import sarpy
      2 import sarpy.analysis

/home/fmoosvi/sarpy/sarpy/__init__.py in <module>()
     17 conf_name = os.path.join(__path__[0], 'logging.json')
     18 with open(conf_name, 'rt') as f:
---> 19     logging.config.dictConfig(json.load(f))
     20 logger.info('restarting sarpy application')
     21 

/home/stefan/anaconda3/lib/python3.5/logging/config.py in dictConfig(config)
    793 def dictConfig(config):
    794     """Configure logging using a dictionary."""
--> 795     dictConfigClass(config).configure()
    796 
    797 

/home/stefan/anaconda3/lib/python3.5/logging/config.py in configure(self)
    564                         else:
    565                             raise ValueError('Unable to configure handler '
--> 566                                              '%r: %s' % (name, e))
    567 
    568                 # Now do any that were deferred

ValueError: Unable to configure handler 'error_file_handler': [Errno 13] Permission denied: '/tmp/sarpy.errors.log'
DrSAR commented 8 years ago

How about you delete the log and start over?

DrSAR commented 8 years ago

Oh - I think the problem is to write to a common area (/tmp) rather than everyone into their own space. OK - will need to revert d1c5687fc08

DrSAR commented 8 years ago

solved by 24557c9