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

[via email] Error when making the payment Steffo99/greed #121

Closed
Steffo99 opened this issue May 6, 2021 · 3 comments
Closed

[via email] Error when making the payment Steffo99/greed #121

Steffo99 opened this issue May 6, 2021 · 3 comments
Assignees
Labels
bug Something that doesn't work as expected.

Comments

@Steffo99
Copy link
Owner

Steffo99 commented May 6, 2021

From: samuel ramirez jsramirezch@outlook.com

2021-05-06 12:46:54 | Worker 1775961268 | worker | Exception in <Worker 177=
5961268>: (sqlite3.IntegrityError) NOT NULL constraint failed: orderitems.o=
rder_id
[SQL: INSERT INTO orderitems (product_id, order_id) VALUES (?, ?)]
[parameters: (1, None)]
(Background on this error at: http://sqlalche.me/e/14/gkpj)
Traceback (most recent call last):
File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack=
ages\sqlalchemy\engine\base.py", line 1763, in _execute_context
self.dialect.do_execute(
File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack=
ages\sqlalchemy\engine\default.py", line 717, in do_execute
cursor.execute(statement, parameters)
sqlite3.IntegrityError: NOT NULL constraint failed: orderitems.order_id

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\jsram\greed\worker.py", line 211, in run
self.__admin_menu()
File "C:\Users\jsram\greed\worker.py", line 926, in __admin_menu
self.__user_menu()
File "C:\Users\jsram\greed\worker.py", line 468, in __user_menu
self.__order_menu()
File "C:\Users\jsram\greed\worker.py", line 663, in __order_menu
self.__order_transaction(order=3Dorder, value=3D-int(self.__get_cart_va=
lue(cart)))
File "C:\Users\jsram\greed\worker.py", line 689, in __order_transaction
self.session.commit()
File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack=
ages\sqlalchemy\orm\session.py", line 1428, in commit
self._transaction.commit(_to_root=3Dself.future)
File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack=
ages\sqlalchemy\orm\session.py", line 826, in commit
self._prepare_impl()
File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack=
ages\sqlalchemy\orm\session.py", line 805, in _prepare_impl
self.session.flush()
File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack=
ages\sqlalchemy\orm\session.py", line 3260, in flush
self._flush(objects)
File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack=
ages\sqlalchemy\orm\session.py", line 3400, in flush
transaction.rollback(capture_exception=3DTrue)
File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack=
ages\sqlalchemy\util\langhelpers.py", line 70, in exit
compat.raise
(
File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack=
ages\sqlalchemy\util\compat.py", line 211, in raise

raise exception
File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack=
ages\sqlalchemy\orm\session.py", line 3360, in _flush
flush_context.execute()
File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack=
ages\sqlalchemy\orm\unitofwork.py", line 453, in execute
rec.execute(self)
File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack=
ages\sqlalchemy\orm\unitofwork.py", line 627, in execute
util.preloaded.orm_persistence.save_obj(
File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack=
ages\sqlalchemy\orm\persistence.py", line 242, in save_obj
_emit_insert_statements(
File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack=
ages\sqlalchemy\orm\persistence.py", line 1219, in _emit_insert_statements
result =3D connection._execute_20(
File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack=
ages\sqlalchemy\engine\base.py", line 1578, in _execute_20
return meth(self, args_10style, kwargs_10style, execution_options)
File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack=
ages\sqlalchemy\sql\elements.py", line 320, in _execute_on_connection
return connection._execute_clauseelement(
File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack=
ages\sqlalchemy\engine\base.py", line 1447, in _execute_clauseelement
ret =3D self._execute_context(
File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack=
ages\sqlalchemy\engine\base.py", line 1806, in _execute_context
self.handle_dbapi_exception(
File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack=
ages\sqlalchemy\engine\base.py", line 1987, in handle_dbapi_exception
util.raise
(
File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack=
ages\sqlalchemy\util\compat.py", line 211, in raise

raise exception
File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack=
ages\sqlalchemy\engine\base.py", line 1763, in _execute_context
self.dialect.do_execute(
File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack=
ages\sqlalchemy\engine\default.py", line 717, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.IntegrityError: (sqlite3.IntegrityError) NOT NULL constraint=
failed: orderitems.order_id
[SQL: INSERT INTO orderitems (product_id, order_id) VALUES (?, ?)]
[parameters: (1, None)]
(Background on this error at: http://sqlalche.me/e/14/gkpj)
Enviado desde Correohttps://go.microsoft.com/fwlink/?LinkId=3D550986 para=
Windows 10

@Steffo99 Steffo99 added the bug Something that doesn't work as expected. label May 6, 2021
@Steffo99
Copy link
Owner Author

Steffo99 commented May 6, 2021

This bug was introduced in 262eea2 .

@valentino-sm, can you please fix it? :)

@valentino-sm
Copy link
Contributor

valentino-sm commented May 6, 2021

Looks like I'm making all worse =D
I can't reproduce exception now
Looks similar what 6a70a45 fixes

@Steffo99 Steffo99 self-assigned this May 6, 2021
@Steffo99
Copy link
Owner Author

Steffo99 commented May 6, 2021

This should be fixed.

@Steffo99 Steffo99 closed this as completed May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that doesn't work as expected.
Projects
None yet
Development

No branches or pull requests

2 participants