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

Exception while handling packet #103

Closed
xoriole opened this issue Apr 10, 2018 · 3 comments
Closed

Exception while handling packet #103

xoriole opened this issue Apr 10, 2018 · 3 comments
Labels
priority: high Bugs, broken functionality or critical features

Comments

@xoriole
Copy link
Contributor

xoriole commented Apr 10, 2018

ERROR   1523354803.66       community:299   Exception occurred while handling packet!
Traceback (most recent call last):
  File "/home/sandip/tudelft/tribler/Tribler/pyipv8/ipv8/deprecated/community.py", line 296, in on_packet
    self.decode_map[data[22]](source_address, data)
  File "/home/sandip/tudelft/tribler/Tribler/pyipv8/ipv8/attestation/trustchain/community.py", line 33, in wrapper
    return f(self, *args, **kwargs)
  File "/home/sandip/tudelft/tribler/Tribler/pyipv8/ipv8/attestation/trustchain/community.py", line 168, in received_half_block
    self.process_half_block(block, peer)
  File "/home/sandip/tudelft/tribler/Tribler/pyipv8/ipv8/attestation/trustchain/community.py", line 33, in wrapper
    return f(self, *args, **kwargs)
  File "/home/sandip/tudelft/tribler/Tribler/pyipv8/ipv8/attestation/trustchain/community.py", line 227, in process_half_block
    validation = self.validate_persist_block(blk)
  File "/home/sandip/tudelft/tribler/Tribler/pyipv8/ipv8/attestation/trustchain/community.py", line 211, in validate_persist_block
    validation = block.validate(self.persistence)
  File "/home/sandip/tudelft/tribler/Tribler/pyipv8/ipv8/attestation/trustchain/block.py", line 156, in validate
    blk = database.get(self.public_key, self.sequence_number)
  File "/home/sandip/tudelft/tribler/Tribler/pyipv8/ipv8/attestation/trustchain/database.py", line 63, in get
    return self._get(u"WHERE public_key = ? AND sequence_number = ?", (buffer(public_key), sequence_number))
  File "/home/sandip/tudelft/tribler/Tribler/pyipv8/ipv8/attestation/trustchain/database.py", line 49, in _get
    db_result = list(self.execute(self.get_sql_header() + query, params, fetch_all=False))
  File "/home/sandip/tudelft/tribler/Tribler/pyipv8/ipv8/database.py", line 40, in wrapper
    return f(self, *args, **kwargs)
  File "/home/sandip/tudelft/tribler/Tribler/pyipv8/ipv8/database.py", line 302, in execute
    result = self._cursor.execute(statement, bindings)
AttributeError: 'NoneType' object has no attribute 'execute'
@xoriole xoriole added the priority: high Bugs, broken functionality or critical features label Apr 10, 2018
@qstokkink
Copy link
Collaborator

The cursor does not exist. This probably happens while shutting down. Is this correct @xoriole ?

@qstokkink
Copy link
Collaborator

qstokkink commented Apr 19, 2018

It seems this line:

# Close the persistence layer
self.persistence.close()

Should be executed after the parent (superclass) is unloaded, instead of before the super is unloaded.

@xoriole
Copy link
Contributor Author

xoriole commented Apr 19, 2018

@qstokkink yes, correct, it happens during shutdown.

...
Should be executed after the parent (superclass) is unloaded, instead of before the super is unloaded.

seems right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: high Bugs, broken functionality or critical features
Development

No branches or pull requests

2 participants