Open martincousi opened 3 weeks ago
Hi @martincousi , thanks for the heads up, apparently a recent update made the library incompatible with windows OS. Let me try to replicate on my side and confirm if that's the issue. In the meantime, can you try running it on a Unix based OS? For example, you can run on Google colab: https://colab.research.google.com/drive/1QL7-L4AjL0kZ4nC51K2BmE_9_pNHsdtu?usp=sharing
Update: sorry, saw the full message only now. Can you share an example of notebook that would raise this error?
This is a notebook with such table and lines: https://github.com/acedesci/scanalytics/blob/master/EN/S01_Intro/01_InClass_Exercises.ipynb
I also saw that jtranslate translates the \left(
and \right)
LaTeX commands which is problematic.
Thanks @martincousi! I was able to replicate it here. In the meantime, can you please run the legacy version at https://github.com/WittmannF/jupyter-translate/tree/master/legacy ? I was able to run the file from there with no issues.
@andrebelem, can you please take a look? I'm trying to understand which specific recent change is raising this error.
The code is probably confusing the sequence of strings that mark the table. Tomorrow I will study how the code reacts in different situations to correct it. In the meantime, I suggest using legacy (just point python to the legacy code).
First assessement: The code was designed to search for a specific pattern in a text and replace it with something else. However, it ran into a problem because of two special cases:
What Was Done to Fix It?
Update: I wanted to update you that I am currently conducting tests, but I’ve encountered significant degradation with Google services today. Due to these issues, I will need more time to complete the testing.
I appreciate your understanding and will keep you posted on any further developments.
⚠️ Warning: Proper Handling of Embedded Code When including embedded code in your markdown files, please ensure that the code is enclosed within triple backticks (```). This is essential to prevent the program from mistakenly translating the code or misinterpreting it as regular text.
Example of Proper Embedded Code:
def example_function():
"""This is a docstring."""
return "Hello, World!"
Why This is Important: If embedded code is not properly enclosed within triple backticks, the program may inadvertently translate the code, altering its functionality or meaning. This can lead to unexpected results, especially when the embedded code is meant for demonstration purposes rather than execution.
When translating a notebook to french, jtranslate reports the following error:
Removing the Markdown lines
---
in my notebook allowed jtranslate to progress further. However, it stopped again when arriving at a Markdown table:Once that table was removed, I was able to fully translation the notebook. Is there an option to skip
---
lines and Markdown tables?