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

geoalchemy and python 3 #41

Open
mese79 opened this issue Jun 5, 2015 · 2 comments · May be fixed by #42
Open

geoalchemy and python 3 #41

mese79 opened this issue Jun 5, 2015 · 2 comments · May be fixed by #42

Comments

@mese79
Copy link

mese79 commented Jun 5, 2015

Hi
Does geoalchemy work with python 3.x ?
After i installed it, i've got this error on import:

>>> from geoalchemy import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/mehdi/Programming/Python/virtualenvs/measurment-app/lib/python3.4/site-packages/GeoAlchemy-0.7.3.dev0-py3.4.egg/geoalchemy/__init__.py", line 2, in <module>
    from geoalchemy.base import *
  File "/home/mehdi/Programming/Python/virtualenvs/measurment-app/lib/python3.4/site-packages/GeoAlchemy-0.7.3.dev0-py3.4.egg/geoalchemy/base.py", line 7, in <module>
    from utils import from_wkt
ImportError: No module named 'utils'

I'm working with an oracle database, so i think geoalchemy is the only package that i can use. isn't it?
Thanks.

@mwiebusch78
Copy link

I had the same problem. I'm not a geoalchemy developer, but I got it running with the following modifications to the code:

  1. In base.py change

    from utils import ...
    from functions import ...

to

from geoalchemy.utils import ...
from geoalchemy.functions import ...
  1. In base.py change any mention of ColumnProperty.ColumnComparator to ColumnProperty.Comparator.
  2. In geometry.py replace any calls to the has_key method with the corresponding 'in' expression.

@reticulan
Copy link

It still not working

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

Successfully merging a pull request may close this issue.

3 participants