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

Thread exception in indexing files in shared folder #10

Closed
adirags opened this issue Oct 29, 2016 · 1 comment
Closed

Thread exception in indexing files in shared folder #10

adirags opened this issue Oct 29, 2016 · 1 comment
Assignees

Comments

@adirags
Copy link
Collaborator

adirags commented Oct 29, 2016

I've attached the log from the server side below.
Issue was noticed on doing the following :
1. Client downloaded a file
2. After download was completed (while server was logging "connecting to 192.168.112.173:1235 for hashdump" ), I deleted the file from the Download directory.
3. All hell broke lose!! Didn't cause the server to crash or anything, but thread exception generated and the thread running fileindexer failed due to KeyError

****** iWanto Download client_search.png **********
Downloading to: /home/adithya/Desktop/iWant/client_search.png
[=============================================================================] 100%
client_search.png downloaded
/home/adithya/Desktop/iWant/client_search.png created
/home/adithya/Desktop/iWant modified
Indexing files in the shared folder ] 0%
[========================================================================] 100%
/home/adithya/Desktop/iWant/client_search.png modified
connecting to 192.168.112.173:1235 for hashdump
connecting to 192.168.112.173:1235 for hashdump
connecting to 192.168.112.173:1235 for hashdump
/home/adithya/Desktop/iWant/client_search.png deleted
Indexing files in the shared folder ] 0%
[========================================================================] 100%
discarding /home/adithya/Desktop/iWant/client_search.png
/home/adithya/Desktop/iWant modified
Indexing files in the shared folder ] 0%
Exception in thread Thread-1: ] 9%
Traceback (most recent call last):
File "/home/adithya/anaconda2/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/home/adithya/.local/lib/python2.7/site-packages/watchdog-0.8.3-py2.7.egg/watchdog/observers/api.py", line 199, in run
self.dispatch_events(self.event_queue, self.timeout)
File "/home/adithya/.local/lib/python2.7/site-packages/watchdog-0.8.3-py2.7.egg/watchdog/observers/api.py", line 368, in dispatch_events
handler.dispatch(event)
File "/home/adithya/.local/lib/python2.7/site-packages/watchdog-0.8.3-py2.7.egg/watchdog/events.py", line 446, in dispatch
self.on_any_event(event)
File "/home/adithya/Desktop/iWant/iWant/iwant/core/engine/monitor/watching.py", line 22, in on_any_event
self.process(event)
File "/home/adithya/Desktop/iWant/iWant/iwant/core/engine/monitor/watching.py", line 29, in process
idx.index()
File "/home/adithya/Desktop/iWant/iWant/iwant/core/engine/fileindexer/findexer.py", line 57, in index
self._create_file_index()
File "/home/adithya/Desktop/iWant/iWant/iwant/core/engine/fileindexer/findexer.py", line 114, in _create_file_index
self.compute_hash_diff_file(destination_file_path)
File "/home/adithya/Desktop/iWant/iWant/iwant/core/engine/fileindexer/findexer.py", line 89, in compute_hash_diff_file
if self.hash_index[md5_checksum][-1] != filesize:
KeyError: '3b7b2a84b8016ac95b625a8ebcebb966'

connecting to 192.168.112.173:1235 for hashdump

@nirvik
Copy link
Owner

nirvik commented May 22, 2017

fixed

@nirvik nirvik closed this as completed May 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants