{"action":"created","issue":{"url":"https://api.github.com/repos/ODM2/ODM2PythonAPI/issues/59","repository_url":"https://api.github.com/repos/ODM2/ODM2PythonAPI","labels_url":"https://api.github.com/repos/ODM2/ODM2PythonAPI/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/ODM2/ODM2PythonAPI/issues/59/comments","events_url":"https://api.github.com/repos/ODM2/ODM2PythonAPI/issues/59/events","html_url":"https://github.com/ODM2/ODM2PythonAPI/issues/59","id":149608831,"number":59,"title":"Python 3.4.3 Geoalchemy Error","user":{"login":"Castronova","id":4822372,"avatar_url":"https://avatars.githubusercontent.com/u/4822372?v=3","gravatar_id":"","url":"https://api.github.com/users/Castronova","html_url":"https://github.com/Castronova","followers_url":"https://api.github.com/users/Castronova/followers","following_url":"https://api.github.com/users/Castronova/following{/other_user}","gists_url":"https://api.github.com/users/Castronova/gists{/gist_id}","starred_url":"https://api.github.com/users/Castronova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Castronova/subscriptions","organizations_url":"https://api.github.com/users/Castronova/orgs","repos_url":"https://api.github.com/users/Castronova/repos","events_url":"https://api.github.com/users/Castronova/events{/privacy}","received_events_url":"https://api.github.com/users/Castronova/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ODM2/ODM2PythonAPI/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"emiliom","id":742403,"avatar_url":"https://avatars.githubusercontent.com/u/742403?v=3","gravatar_id":"","url":"https://api.github.com/users/emiliom","html_url":"https://github.com/emiliom","followers_url":"https://api.github.com/users/emiliom/followers","following_url":"https://api.github.com/users/emiliom/following{/other_user}","gists_url":"https://api.github.com/users/emiliom/gists{/gist_id}","starred_url":"https://api.github.com/users/emiliom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emiliom/subscriptions","organizations_url":"https://api.github.com/users/emiliom/orgs","repos_url":"https://api.github.com/users/emiliom/repos","events_url":"https://api.github.com/users/emiliom/events{/privacy}","received_events_url":"https://api.github.com/users/emiliom/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2016-04-19T23:13:43Z","updated_at":"2016-04-22T18:41:27Z","closed_at":null,"body":"Attempting to install odm2api on a CentOS 7 machine that is running Python 3.4.3 using the source code from the [python 3.x compatibility](https://github.com/ODM2/ODM2PythonAPI/pull/58) pull request.  While the odm2api installs fine, it is dependent on **geoalchemy** which raises the following ImportError:\r\n\r\n```\r\n>>> import odm2api\r\nutils imported\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/usr/lib/python3.4/site-packages/odm2api/__init__.py\", line 1, in <module>\r\n    from odm2api.ODMconnection import SessionFactory, dbconnection\r\n  File \"/usr/lib/python3.4/site-packages/odm2api/ODMconnection.py\", line 6, in <module>\r\n    from .ODM2.models import Variables as Variable2, setSchema\r\n  File \"/usr/lib/python3.4/site-packages/odm2api/ODM2/models.py\", line 7, in <module>\r\n    from geoalchemy import GeometryDDL, GeometryColumn\r\n  File \"/usr/lib64/python3.4/site-packages/geoalchemy/__init__.py\", line 2, in <module>\r\n    from geoalchemy.base import *\r\n  File \"/usr/lib64/python3.4/site-packages/geoalchemy/base.py\", line 7, in <module>\r\n    from utils import from_wkt\r\nImportError: cannot import name 'from_wkt'\r\n```\r\n\r\nThis is documented as geoalchemy issue [#41](https://github.com/geoalchemy/geoalchemy/issues/41) and a [pull request](https://github.com/geoalchemy/geoalchemy/pull/42) was created to fix this in November 2015, but hasn't been touched since January 2016.\r\n\r\n---\r\n\r\nHere is the suggested fix from [#41](https://github.com/geoalchemy/geoalchemy/issues/41)\r\n\r\n> In base.py change\r\n\r\n> ```\r\n> from utils import ...\r\n> from functions import ...\r\n> ```\r\n>\r\n> to\r\n>\r\n> ```\r\n> from geoalchemy.utils import ...\r\n> from geoalchemy.functions import ...\r\n> ```\r\n>\r\n> In base.py change any mention of `ColumnProperty.ColumnComparator` to `ColumnProperty.Comparator`\r\n>\r\n> In geometry.py replace any calls to the `has_key` method with the corresponding 'in' expression.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ODM2/ODM2PythonAPI/issues/comments/213548482","html_url":"https://github.com/ODM2/ODM2PythonAPI/issues/59#issuecomment-213548482","issue_url":"https://api.github.com/repos/ODM2/ODM2PythonAPI/issues/59","id":213548482,"user":{"login":"valentinedwv","id":851784,"avatar_url":"https://avatars.githubusercontent.com/u/851784?v=3","gravatar_id":"","url":"https://api.github.com/users/valentinedwv","html_url":"https://github.com/valentinedwv","followers_url":"https://api.github.com/users/valentinedwv/followers","following_url":"https://api.github.com/users/valentinedwv/following{/other_user}","gists_url":"https://api.github.com/users/valentinedwv/gists{/gist_id}","starred_url":"https://api.github.com/users/valentinedwv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valentinedwv/subscriptions","organizations_url":"https://api.github.com/users/valentinedwv/orgs","repos_url":"https://api.github.com/users/valentinedwv/repos","events_url":"https://api.github.com/users/valentinedwv/events{/privacy}","received_events_url":"https://api.github.com/users/valentinedwv/received_events","type":"User","site_admin":false},"created_at":"2016-04-22T18:41:27Z","updated_at":"2016-04-22T18:41:27Z","body":"Not quite a simple as we could wish.\r\npython3 branch for ODM2PythonAPI.\r\nGeoalchemy need to get the 'generic' working on 3.x (others busting due to insert issues with the comparator)\r\nmaybe strip out oracle?\r\n0.49s$ if [[ \"$DB\" == \"generic\" ]]; then python geoalchemy/tests/test_dialect.py; fi\r\nTraceback (most recent call last):\r\n  File \"geoalchemy/tests/test_dialect.py\", line 15, in <module>\r\n    from geoalchemy.oracle import OracleSpatialDialect\r\n  File \"/home/travis/build/ODM2/geoalchemy/geoalchemy/oracle.py\", line 96\r\n    elif isinstance(geom, (WKBSpatialElement, WKTSpatialElement)) and geom.geometry_type <> Geometry.name:\r\n                                                                                          ^\r\nSyntaxError: invalid syntax\r\n"}}