machawk1 / wail

:whale2: Web Archiving Integration Layer: One-Click User Instigated Preservation
https://matkelly.com/wail
MIT License
345 stars 32 forks source link

Contextual menu does not work with crawl jobs with names that are not numerical #527

Closed machawk1 closed 2 years ago

machawk1 commented 2 years ago

Screen Shot 2021-07-22 at 8 34 00 PM

Functioning contextual menu attached. Right-clicking on the externally modified entry does not produce the menu.

This is based on the latest main branch.

machawk1 commented 2 years ago

On debugging, even selection in the list causes an exception:

Traceback (most recent call last):
  File "/private/tmp/wail/bundledApps/wailUtil.py", line 18, in tail
    f.seek(block_counter * _buffer, os.SEEK_END)
io.UnsupportedOperation: can't do nonzero end-relative seeks

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/private/tmp/wail/bundledApps/WAIL.py", line 1199, in clicked_listbox_item
    self.update_info_panel(crawl_id)
  File "/private/tmp/wail/bundledApps/WAIL.py", line 1202, in update_info_panel
    self.status_msg.SetLabel(Heritrix().get_current_stats(active))
  File "/private/tmp/wail/bundledApps/WAIL.py", line 2030, in get_current_stats
    last_line = util.tail(progress_log_file_path)
  File "/private/tmp/wail/bundledApps/wailUtil.py", line 22, in tail
    lines_found = f.readlines()
  File "/opt/homebrew/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 555: ordinal not in range(128)