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

[BUG] Error in indexer when ordering make on ibetExchange #259

Closed
urushibata-k opened this issue Jan 17, 2022 · 0 comments · Fixed by #262
Closed

[BUG] Error in indexer when ordering make on ibetExchange #259

urushibata-k opened this issue Jan 17, 2022 · 0 comments · Fixed by #262
Assignees
Labels
bug Something isn't working
Projects

Comments

@urushibata-k
Copy link
Collaborator

urushibata-k commented Jan 17, 2022

Describe the bug

The following error occurred in ibet-Wallet-API.
refs BoostryJP/ibet-Wallet-API#1099

[2022-01-17 02:47:30 +0000] [INDEXER-POSITION-MEMBERSHIP] [37] [INFO] syncing from=2461470, to=2461479                                                                                                                                   │
│   [2022-01-17 02:47:31 +0000] [INDEXER-POSITION-MEMBERSHIP] [37] [ERROR] Class 'builtins.NoneType' is not mapped                                                                                                                           │
│   Traceback (most recent call last):                                                                                                                                                                                                       │
│     File "batch/indexer_Position_Membership.py", line 331, in __sync_exchange                                                                                                                                                              │
│       self.sink.on_position(                                                                                                                                                                                                               │
│     File "batch/indexer_Position_Membership.py", line 67, in on_position                                                                                                                                                                   │
│       sink.on_position(*args, **kwargs)                                                                                                                                                                                                    │
│     File "batch/indexer_Position_Membership.py", line 115, in on_position                                                                                                                                                                  │
│       self.db.merge(position)                                                                                                                                                                                                              │
│     File "<string>", line 2, in merge                                                                                                                                                                                                      │
│     File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 2969, in merge                                                                                                                      │
│       object_mapper(instance)  # verify mapped                                                                                                                                                                                             │
│     File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/orm/base.py", line 296, in object_mapper                                                                                                                  │
│       return object_state(instance).mapper                                                                                                                                                                                                 │
│     File "/home/apl/.pyenv/versions/3.8.7/lib/python3.8/site-packages/sqlalchemy/orm/base.py", line 318, in object_state                                                                                                                   │
│       raise exc.UnmappedInstanceError(instance)                                                                                                                                                                                            │
│   sqlalchemy.orm.exc.UnmappedInstanceError: Class 'builtins.NoneType' is not mapped

Expected behavior

Being skiped merge when registering with 0 holdings.

@urushibata-k urushibata-k added the bug Something isn't working label Jan 17, 2022
@urushibata-k urushibata-k added this to To do in v22.3.0 via automation Jan 17, 2022
@urushibata-k urushibata-k changed the title [BUG] [BUG] 'builtins.NoneType' is not mapped Jan 17, 2022
@urushibata-k urushibata-k changed the title [BUG] 'builtins.NoneType' is not mapped [BUG] INDEXER-POSITION error 'builtins.NoneType' is not mapped Jan 17, 2022
@urushibata-k urushibata-k changed the title [BUG] INDEXER-POSITION error 'builtins.NoneType' is not mapped [BUG] Error in indexer when ordering make on ibetExchange Jan 17, 2022
v22.3.0 automation moved this from To do to Done Jan 17, 2022
YoshihitoAso added a commit that referenced this issue Jan 17, 2022
fix: Error in indexer when ordering make on ibetExchange
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
v22.3.0
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants