Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permissions error with import pytz (in utils.py) #178

Closed
domlowe opened this issue Sep 25, 2014 · 4 comments
Closed

Permissions error with import pytz (in utils.py) #178

domlowe opened this issue Sep 25, 2014 · 4 comments

Comments

@domlowe
Copy link
Member

domlowe commented Sep 25, 2014

I am getting a permissions error (Ubuntu) when trying to run owslib after an easy_install install on system python 2.7:

from owslib.sos import SensorObservationService
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/OWSLib-0.8.9-py2.7.egg/owslib/sos.py", line 14, in
from swe.observation import sos100, sos200
File "/usr/local/lib/python2.7/dist-packages/OWSLib-0.8.9-py2.7.egg/owslib/swe/observation/sos100.py", line 5, in
from owslib import ows
File "/usr/local/lib/python2.7/dist-packages/OWSLib-0.8.9-py2.7.egg/owslib/ows.py", line 19, in
from owslib import crs, util
File "/usr/local/lib/python2.7/dist-packages/OWSLib-0.8.9-py2.7.egg/owslib/util.py", line 14, in
import pytz
File "/usr/local/lib/python2.7/dist-packages/pytz-2014.7-py2.7.egg/pytz/init.py", line 29, in
from pkg_resources import resource_stream
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2825, in
add_activation_listener(lambda dist: dist.activate())
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 710, in subscribe
callback(dist)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2825, in
add_activation_listener(lambda dist: dist.activate())
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2257, in activate
self.insert_on(path)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2364, in insert_on
self.check_version_conflict()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2403, in check_version_conflict
for modname in self._get_metadata('top_level.txt'):
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2251, in _get_metadata
for line in self.get_metadata_lines(name):
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1219, in get_metadata_lines
return yield_lines(self.get_metadata(name))
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1211, in get_metadata
return self._get(self._fn(self.egg_info,name))
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1326, in _get
stream = open(path, 'rb')
IOError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/python_dateutil-2.2-py2.7.egg/EGG-INFO/top_level.txt'

I suspect it is caused by this bug in the python dateutil package imported in util.py so not sure there is much can be done about it in OWSLib.

https://bugs.launchpad.net/dateutil/+bug/1243202

@domlowe
Copy link
Member Author

domlowe commented Sep 25, 2014

OWSLib 0.8.9 was installed using:

$ sudo easy_install -U OWSLib

On xubuntu 13.10.

@domlowe
Copy link
Member Author

domlowe commented Sep 25, 2014

For reference a temporary workaround is:
sudo chmod a+r /usr/local/lib/python2.7/dist-packages/python_dateutil-2.2-py2.7.egg/EGG-INFO/*.txt

Copy link

github-actions bot commented Oct 6, 2024

This Issue has been inactive for 90 days. In order to manage maintenance burden, it will be automatically closed in 7 days.

@github-actions github-actions bot added the stale label Oct 6, 2024
@geographika
Copy link
Contributor

pytz removed in #949

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants