retext-project / retext

ReText: Simple but powerful editor for Markdown and reStructuredText
GNU General Public License v2.0
1.88k stars 196 forks source link

No preview in Retest #560

Open andrewmortag opened 3 years ago

andrewmortag commented 3 years ago

Hi, im running W10, Python39 and have ReText 7.2.1 installed by pip3 with all mentioned packages. I want to use this amazing editor for rst texts. Unfortunatly the preview in Retest dosn't work.

Regards, Andrew

Python -m Retext in powershell show up with:

PS C:\WINDOWS\system32> python -m ReText Using configuration file: C:/Users/UsEr/AppData/Roaming/ReText project/ReText.ini C:\Program Files\Python39\lib\site-packages\ReText\window.py:404: RuntimeWarning: Dictionary for language 'de_DE' could not be found Please check https://pyenchant.github.io/pyenchant/ for details warnings.warn(str(e), RuntimeWarning) [1584:15984:0522/145536.758:ERROR:cache_util_win.cc(19)] Unable to move the cache: 5 [1584:15984:0522/145536.758:ERROR:cache_util.cc(140)] Unable to move cache folder C:\Users\UsEr\AppData\Local\ReText project\ReText\QtWebEngine\Default\GPUCache to C:\Users\UsEr\AppData\Local\ReText project\ReText\QtWebEngine\Default\old_GPUCache_000 [1584:15984:0522/145536.759:ERROR:disk_cache.cc(168)] Unable to create cache [1584:15984:0522/145536.762:ERROR:shader_disk_cache.cc(620)] Shader Cache Creation failed: -2

mitya57 commented 3 years ago

Hi!

It looks like these errors are not specific to ReText, but also happen with other Qt / PyQt applications using Qt WebEngine.

Is the preview completely blank for you, or only some of the content is missing? Does this happen with only a specific document or with all documents? Also can you check if unselecting “Edit → Use WebEngine (Chromium) renderer” helps?

andrewmortag commented 3 years ago

Hi Thank you for reply.

My observations so far:

  1. I loaded first a rst doc i made with a different editor (geany) in order to see the preview effect => the preview doesn't work. It's completly blank.

  2. I opend Retext, started a new doc and enterd some rst formated text => the preview shows pretty formated text.

  3. Checking or unchecking of the option "Edit → Use WebEngine (Chromium) renderer" dosent't seem to have an effect. Rst in a new window is shown in preview. The loaded file made with a different editor results in a complete blank preview.

  4. It is possible to start Retext from cmd or powershell and the preview is working in case of rst text in a new text window.

  5. It is not possible to start Retext directly in explorer from C:\Program Files\Python39\Scripts until i start with "run as admin".

  6. The 2 selectors "format" and "symbols" are disabled all the time. What to do for enabling the selectors?

Regards, Andrew

mitya57 commented 3 years ago

The behavior you are describing is very strange. I want to ask you some questions that may shed more light on this:

It is not possible to start Retext directly in explorer from C:\Program Files\Python39\Scripts until i start with "run as admin".

This may also be a clue. ReText uses a separate process for rendering. Maybe there are some issues with permissions for that process?

I have very little knowledge of Windows so I can’t say why it happens. ReText definitely does not need administrator/superuser rights for anything. And it’s surprising that python -m ReText works and calling the script directly does not. Maybe you can try changing some permissions of that script?

The 2 selectors "format" and "symbols" are disabled all the time. What to do for enabling the selectors?

It is normal. These boxes are only for Markdown and not for reStructuredText. In fact, I consider them of little use even for Markdown, but some users like them so I keep them for now.

Hrissimir commented 3 years ago

This happens because of bug in the markups package.

Assumptions:

Really-dirty-fix for the issue:

Hrissimir commented 3 years ago

Created:

To all ReText authors/contributors: Thank you for the great app!