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
If we try to insert value in a table which doesn't have a pk, we get the following error:
(pystache) perette@bobbynette:~/git/populous/demo_superette$ populous run postgres blueprints/*.yml
Getting existing unique values...
Starting generation...
Traceback (most recent call last):
File "/home/perette/.virtualenvs/pystache/bin/populous", line 11, in <module>
sys.exit(cli())
File "/home/perette/.virtualenvs/pystache/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/home/perette/.virtualenvs/pystache/local/lib/python2.7/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/perette/.virtualenvs/pystache/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/perette/.virtualenvs/pystache/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/perette/.virtualenvs/pystache/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/perette/.virtualenvs/pystache/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/perette/.virtualenvs/pystache/local/lib/python2.7/site-packages/populous/cli.py", line 75, in postgres
db=db, user=user, password=password)
File "/home/perette/.virtualenvs/pystache/local/lib/python2.7/site-packages/populous/cli.py", line 53, in _generic_run
blueprint.generate()
File "/home/perette/.virtualenvs/pystache/local/lib/python2.7/site-packages/populous/blueprint.py", line 143, in generate
buffer.flush()
File "/home/perette/.virtualenvs/pystache/local/lib/python2.7/site-packages/populous/buffer.py", line 23, in flush
self.write(self.blueprint.items[item_name], buffer)
File "/home/perette/.virtualenvs/pystache/local/lib/python2.7/site-packages/populous/buffer.py", line 30, in write
item, tuple(item.db_values(obj) for obj in buffer)
File "/home/perette/.virtualenvs/pystache/local/lib/python2.7/site-packages/populous/backends/postgres.py", line 76, in write
self.get_pk_column(item.table)
File "/home/perette/.virtualenvs/pystache/local/lib/python2.7/site-packages/functools32/functools32.py", line 400, in wrapper
result = user_function(*args, **kwds)
File "/home/perette/.virtualenvs/pystache/local/lib/python2.7/site-packages/populous/backends/postgres.py", line 140, in get_pk_column
return cursor.fetchone()[0]
TypeError: 'NoneType' object has no attribute '__getitem__'
We should return a descriptive error instead.
The text was updated successfully, but these errors were encountered:
If we try to insert value in a table which doesn't have a pk, we get the following error:
We should return a descriptive error instead.
The text was updated successfully, but these errors were encountered: