You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to create a semanticsearch table in the embeddings_sts_tf postgresql database with the 6 fields specified.
But I got the following error code:
2021-09-01 15:35:32,439 INFO sqlalchemy.engine.Engine select version()
2021-09-01 15:35:32,440 INFO sqlalchemy.engine.Engine [raw sql] {}
2021-09-01 15:35:32,440 INFO sqlalchemy.engine.Engine select current_schema()
2021-09-01 15:35:32,440 INFO sqlalchemy.engine.Engine [raw sql] {}
2021-09-01 15:35:32,441 INFO sqlalchemy.engine.Engine show standard_conforming_strings
2021-09-01 15:35:32,441 INFO sqlalchemy.engine.Engine [raw sql] {}
2021-09-01 15:35:32,441 INFO sqlalchemy.engine.Engine BEGIN (implicit)
2021-09-01 15:35:32,442 INFO sqlalchemy.engine.Engine select relname from pg_class c join pg_namespace n on n.oid=c.relnamespace where pg_catalog.pg_table_is_visible(c.oid) and relname=%(name)s
2021-09-01 15:35:32,442 INFO sqlalchemy.engine.Engine [generated in 0.00015s] {'name': 'semanticsearch'}
2021-09-01 15:35:32,443 INFO sqlalchemy.engine.Engine ROLLBACK
Traceback (most recent call last):
File "/home/matthieu/anaconda3/envs/sts-transformers-gpu-fresh/lib/python3.8/site-packages/sqlalchemy/sql/compiler.py", line 4143, in visit_create_table
processed = self.process(
File "/home/matthieu/anaconda3/envs/sts-transformers-gpu-fresh/lib/python3.8/site-packages/sqlalchemy/sql/compiler.py", line 489, in process
return obj._compiler_dispatch(self, **kwargs)
File "/home/matthieu/anaconda3/envs/sts-transformers-gpu-fresh/lib/python3.8/site-packages/sqlalchemy/sql/visitors.py", line 82, in _compiler_dispatch
return meth(self, **kw)
File "/home/matthieu/anaconda3/envs/sts-transformers-gpu-fresh/lib/python3.8/site-packages/sqlalchemy/sql/compiler.py", line 4177, in visit_create_column
text = self.get_column_specification(column, first_pk=first_pk)
File "/home/matthieu/anaconda3/envs/sts-transformers-gpu-fresh/lib/python3.8/site-packages/sqlalchemy/dialects/postgresql/base.py", line 2509, in get_column_specification
colspec += " " + self.dialect.type_compiler.process(
File "/home/matthieu/anaconda3/envs/sts-transformers-gpu-fresh/lib/python3.8/site-packages/sqlalchemy/sql/compiler.py", line 521, in process
return type_._compiler_dispatch(self, **kw)
File "/home/matthieu/anaconda3/envs/sts-transformers-gpu-fresh/lib/python3.8/site-packages/sqlalchemy/sql/visitors.py", line 82, in _compiler_dispatch
return meth(self, **kw)
File "/home/matthieu/anaconda3/envs/sts-transformers-gpu-fresh/lib/python3.8/site-packages/sqlalchemy/sql/compiler.py", line 4724, in visit_null
raise exc.CompileError(
sqlalchemy.exc.CompileError: Can't generate DDL for NullType(); did you forget to specify a type on this Column?
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/matthieu/Code/Python/fastapi-graphql/embeddings_sts_tf_postgresql_db.py", line 65, in <module>
SQLModel.metadata.create_all(engine)
File "/home/matthieu/anaconda3/envs/sts-transformers-gpu-fresh/lib/python3.8/site-packages/sqlalchemy/sql/schema.py", line 4740, in create_all
bind._run_ddl_visitor(
File "/home/matthieu/anaconda3/envs/sts-transformers-gpu-fresh/lib/python3.8/site-packages/sqlalchemy/future/engine.py", line 342, in _run_ddl_visitor
conn._run_ddl_visitor(visitorcallable, element, **kwargs)
File "/home/matthieu/anaconda3/envs/sts-transformers-gpu-fresh/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 2082, in _run_ddl_visitor
visitorcallable(self.dialect, self, **kwargs).traverse_single(element)
File "/home/matthieu/anaconda3/envs/sts-transformers-gpu-fresh/lib/python3.8/site-packages/sqlalchemy/sql/visitors.py", line 520, in traverse_single
return meth(obj, **kw)
File "/home/matthieu/anaconda3/envs/sts-transformers-gpu-fresh/lib/python3.8/site-packages/sqlalchemy/sql/ddl.py", line 846, in visit_metadata
self.traverse_single(
File "/home/matthieu/anaconda3/envs/sts-transformers-gpu-fresh/lib/python3.8/site-packages/sqlalchemy/sql/visitors.py", line 520, in traverse_single
return meth(obj, **kw)
File "/home/matthieu/anaconda3/envs/sts-transformers-gpu-fresh/lib/python3.8/site-packages/sqlalchemy/sql/ddl.py", line 890, in visit_table
self.connection.execute(
File "/home/matthieu/anaconda3/envs/sts-transformers-gpu-fresh/lib/python3.8/site-packages/sqlalchemy/future/engine.py", line 280, in execute
return self._execute_20(
File "/home/matthieu/anaconda3/envs/sts-transformers-gpu-fresh/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1583, in _execute_20
return meth(self, args_10style, kwargs_10style, execution_options)
File "/home/matthieu/anaconda3/envs/sts-transformers-gpu-fresh/lib/python3.8/site-packages/sqlalchemy/sql/ddl.py", line 77, in _execute_on_connection
return connection._execute_ddl(
File "/home/matthieu/anaconda3/envs/sts-transformers-gpu-fresh/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1350, in _execute_ddl
compiled = ddl.compile(
File "/home/matthieu/anaconda3/envs/sts-transformers-gpu-fresh/lib/python3.8/site-packages/sqlalchemy/sql/elements.py", line 489, in compile
return self._compiler(dialect, **kw)
File "/home/matthieu/anaconda3/envs/sts-transformers-gpu-fresh/lib/python3.8/site-packages/sqlalchemy/sql/ddl.py", line 29, in _compiler
return dialect.ddl_compiler(dialect, self, **kw)
File "/home/matthieu/anaconda3/envs/sts-transformers-gpu-fresh/lib/python3.8/site-packages/sqlalchemy/sql/compiler.py", line 454, in __init__
self.string = self.process(self.statement, **compile_kwargs)
File "/home/matthieu/anaconda3/envs/sts-transformers-gpu-fresh/lib/python3.8/site-packages/sqlalchemy/sql/compiler.py", line 489, in process
return obj._compiler_dispatch(self, **kwargs)
File "/home/matthieu/anaconda3/envs/sts-transformers-gpu-fresh/lib/python3.8/site-packages/sqlalchemy/sql/visitors.py", line 82, in _compiler_dispatch
return meth(self, **kw)
File "/home/matthieu/anaconda3/envs/sts-transformers-gpu-fresh/lib/python3.8/site-packages/sqlalchemy/sql/compiler.py", line 4153, in visit_create_table
util.raise_(
File "/home/matthieu/anaconda3/envs/sts-transformers-gpu-fresh/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 207, in raise_
raise exception
sqlalchemy.exc.CompileError: (in table 'semanticsearch', column 'semantic_search_result'): Can't generate DDL for NullType(); did you forget to specify a type on this Column?
Operating System
Linux
Operating System Details
Ubuntu 18.04 LTS
SQLModel Version
0.0.4
Python Version
3.8.8
Additional Context
No response
The text was updated successfully, but these errors were encountered:
First Check
Commit to Help
Example Code
Description
I would like to create a
semanticsearch
table in theembeddings_sts_tf
postgresql database with the 6 fields specified.But I got the following error code:
Operating System
Linux
Operating System Details
Ubuntu 18.04 LTS
SQLModel Version
0.0.4
Python Version
3.8.8
Additional Context
No response
The text was updated successfully, but these errors were encountered: