Unicode error
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Comienza con tasklib/backends.py, especialmente con execute_command, donde se decodifica la salida de p.communicate(), y reproduce el fallo usando tareas que contengan los caracteres indicados. Determina cuál debería ser el tratamiento esperado de esa salida y verifica que filtrar las tareas afectadas ya no provoque UnicodeDecodeError, añadiendo cobertura de regresión si existe una ubicación de prueba adecuada.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 158
- Forks
- 29
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de GothenburgBitFactory/tasklib
-
Dificultad 3/5 1-2 días Aptitud para principiantes 52/100
GothenburgBitFactory/tasklib#136 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
GothenburgBitFactory/tasklib#135 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
GothenburgBitFactory/tasklib#133 · 1 comentario · 2 reacciones ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
GothenburgBitFactory/tasklib#132 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
GothenburgBitFactory/tasklib#131 · 2 comentarios ·
Todos los issues de GothenburgBitFactory/tasklib
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
common-workflow-language/cwl-utils#477 ·
Los mantenedores suelen responder en 1 día
-
Add dependabotAbiertofeat
Dificultad 2/5 Menos de una hora Aptitud para principiantes 72/100
open-nudge/opentemplate#204 ·
Los mantenedores suelen responder en 1 día
-
github-stale-ci-pr-closer: KV state is double-wrapped, never persists, and hits the depth-32 limitPosiblemente ocupada @VascoSch92 la tomó hoy. Abiertopriority:medium ready-for-dev
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
OpenHands/extensions#781 ·
Los mantenedores suelen responder en 1 día
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
curriculum documentation quality
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
githubnext/gh-aw-workshop#4638 ·
Los mantenedores suelen responder en 1 día