Unicode error
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu với tasklib/backends.py, đặc biệt là execute_command, nơi đầu ra của p.communicate() được giải mã, và tái hiện lỗi bằng cách sử dụng các task chứa những ký tự đã được báo cáo. Xác định cách xử lý mong đợi đối với đầu ra đó và xác minh rằng việc lọc các task bị ảnh hưởng không còn gây ra UnicodeDecodeError, đồng thời bổ sung kiểm thử hồi quy nếu có vị trí kiểm thử phù hợp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I have a task generated by bugwarrior from a github issue. The githubbody UDA contains this line:
UDA githubbody: blah blah blah blhín blah blah blah
Also, another github issue, that contains this: 👏🏽, is being transformed into:
Annotation: 2020-07-24 14:00:31 -- @pontusj - Well done! That was not at all obvious! ꃭ辱ꃭ붿
While using the taskwiki plugin in vim, I got an error:
Error detected while processing function provider#python3#Call:
line 18:
Error invoking 'python_execute_file' on channel 3 (python3-script-host):
Traceback (most recent call last):
File "/home/nikos/.local/share/nvim/plugged/taskwiki/taskwiki/main.py", line 666, in <module>
WholeBuffer.update_from_tw()
File "/home/nikos/.local/share/nvim/plugged/taskwiki/taskwiki/errors.py", line 26, in wrapped_function
original_function(*args, **kwargs)
File "/home/nikos/.local/share/nvim/plugged/taskwiki/taskwiki/decorators.py", line 10, in wrapped_function
original_function(*args, **kwargs)
File "/home/nikos/.local/share/nvim/plugged/taskwiki/taskwiki/main.py", line 44, in update_from_tw
c.evaluate_viewports()
File "/home/nikos/.local/share/nvim/plugged/taskwiki/taskwiki/cache.py", line 249, in evaluate_viewports
port.sync_with_taskwarrior()
File "/home/nikos/.local/share/nvim/plugged/taskwiki/taskwiki/viewport.py", line 343, in sync_with_taskwarrior
to_add, to_del = self.get_tasks_to_add_and_del()
File "/home/nikos/.local/share/nvim/plugged/taskwiki/taskwiki/viewport.py", line 317, in get_tasks_to_add_and_del
matching_tasks = self.matching_tasks
File "/home/nikos/.local/share/nvim/plugged/taskwiki/taskwiki/viewport.py", line 294, in matching_tasks
return set(
File "/usr/lib/python3.8/site-packages/tasklib/task.py", line 476, in __iter__
self._result_cache = self._execute()
File "/usr/lib/python3.8/site-packages/tasklib/task.py", line 508, in _execute
return self.backend.filter_tasks(self.filter_obj)
File "/usr/lib/python3.8/site-packages/tasklib/backends.py", line 334, in filter_tasks
for line in self.execute_command(args):
File "/usr/lib/python3.8/site-packages/tasklib/backends.py", line 290, in execute_command
stdout, stderr = [x.decode('utf-8') for x in p.communicate()]
File "/usr/lib/python3.8/site-packages/tasklib/backends.py", line 290, in <listcomp>
stdout, stderr = [x.decode('utf-8') for x in p.communicate()]
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 78938: invalid continuation byte
Using task edit I managed to pinpoint the problem to these particular taskwarrior tasks. I used vim with task edit and searched for \%xed. The character í was highlighted. That's how I assumed the first task was to blame. Removing the strange character did not solve the issue. To find the second task, I manually loaded each task in taskwiki. Removing the strange characters at the end, solved the issue. So perhaps that was the issue all along.
Perhaps, it is the responsibility of bugwarrior to filter such characters, but given the broad range of sources that can go into taskwarrior, perhaps it would be simpler to fix such an issue in tasklib.
- Ngôn ngữ chính
- Python
- Star
- 158
- Fork
- 29
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của GothenburgBitFactory/tasklib
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
GothenburgBitFactory/tasklib#136 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
GothenburgBitFactory/tasklib#135 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
GothenburgBitFactory/tasklib#133 · 1 bình luận · 2 reaction ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
GothenburgBitFactory/tasklib#132 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
GothenburgBitFactory/tasklib#131 · 2 bình luận ·
Tất cả issue của GothenburgBitFactory/tasklib
Issue tương tự
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ianktoo/project-monitor#14 ·
-
A wrong descriptor checksum is refused with the right one, also for an xprv or WIF descriptorĐang mởsecurity
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
btclib-org/btclib-wallet#478 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
btclib-org/btclib#2727 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue lead variant:container
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
radialmonster/orf-cleanroom#10 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
gdsa opencode: keep-alive cleanup trap fails with 'keepalive_pid: unbound variable'Có thể đã có người làm @darribas đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100