force newer sqlalchemy version
panakouris opened this issue · 1 comments
panakouris commented
Hello. On my end I had installed the sqlalchemy==1.2.13 and when trying to get the driver I encountered the following issue
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-3-7c18fb67ea67> in <module>
12
13 insertables = INDEX_INSERTABLES(renamed_cogs, TC_BUCKET_NAME)
---> 14 driver = tc.get_driver(str(DB_PATH))
15 #insertables = SKIP_EXISTING_DATASETS(insertables, driver)
16 insertables = COMPUTE_METADATA(insertables, driver)
~/.conda/envs/py3/lib/python3.6/site-packages/terracotta/drivers/__init__.py in get_driver(url_or_path, provider)
99
100 DriverClass = load_driver(provider)
--> 101 normalized_path = DriverClass._normalize_path(url_or_path)
102 cache_key = (normalized_path, provider, os.getpid())
103
~/.conda/envs/py3/lib/python3.6/site-packages/terracotta/drivers/mysql_meta_store.py in _normalize_path(cls, path)
61 @classmethod
62 def _normalize_path(cls, path: str) -> str:
---> 63 url = cls._parse_path(path)
64
65 path = f'{url.drivername}://{url.host}:{url.port or cls.DEFAULT_PORT}/{url.database}'
~/.conda/envs/py3/lib/python3.6/site-packages/terracotta/drivers/relational_meta_store.py in _parse_path(cls, connection_string)
115 raise ValueError(f'unsupported URL scheme "{con_params.scheme}"')
116
--> 117 url = URL.create(
118 drivername=f'{cls.SQL_DIALECT}+{cls.SQL_DRIVER}',
119 username=con_params.username,
AttributeError: type object 'URL' has no attribute 'create'
After updating sqlalchemy to the latest version (1.4.35) the issue was solved.
dionhaefner commented
Contributions welcome :)