pluveto / Mathink

一个无需依赖 Latex 的 Latex 风格公式编辑器, 支持用作 Inkscape 插件. Engish trans: inkscape math symbols / formula editor with latex/tex syntax. On LaTex NOT depending
45 stars 7 forks source link

Hi, I'm facing some errors #1

Closed moluscus closed 4 years ago

moluscus commented 4 years ago

Hello, I got this error when launching Mathink, could you help me with this please ?

Traceback (most recent call last): File "mathink.py", line 76, in if not process_exists("Mathink.GUI.exe"): File "mathink.py", line 20, in process_exists last_line = output.strip().split('\r\n')[-1] TypeError: a bytes-like object is required, not 'str'

pluveto commented 4 years ago

It seems that variable output is returning bytes instead of a string.

I have no idea about whether this will works, because I've uninstalled related softwares, (mathink.py, line 18) but you can try change output = subprocess.check_output(call) to output = subprocess.getoutput(call). Looking forward to your feedback.

moluscus commented 4 years ago

Thank you for your answer, I tried and it raised another malfunction,

C:\Program Files\Inkscape\lib\python3.8\subprocess.py:942: ResourceWarning: subprocess 908 is still running _warn("subprocess %s is still running" % self.pid, ResourceWarning: Enable tracemalloc to get the object allocation traceback

I'm too dumb at coding unfortunately to solve this without spending a lot of time. Is it something related to my python version or something computer dependent?

pluveto commented 4 years ago

Try this new verison: https://github.com/pluveto/Mathink/releases/download/v1.0/extensions.zip

moluscus commented 4 years ago

Thank you very much, we are progressing.

What's happening now is:

Do you know what's happening ?

Thanks a lot !

pluveto commented 4 years ago

I made a mistake. Mathink/out.d should be Mathink/out.svg in mathink.inx. New version will be uploaded soon.

pluveto commented 4 years ago

https://github.com/pluveto/Mathink/releases/download/v1.1/extensions.zip

moluscus commented 4 years ago

This time it worked fine thanks a lot ! But whenever i close the mathink windows my out.svg file just disappear and if i want to use it again i have to copy paste it ... any idea on this ?

pluveto commented 4 years ago

This time it worked fine thanks a lot ! But whenever i close the mathink windows my out.svg file just disappear and if i want to use it again i have to copy paste it ... any idea on this ?

Try to use "Save as svg image file" by menu operations of that window.

moluscus commented 4 years ago

Everything works, but only once. When i close the Mathink edit window the out.svg file just disappear from the folder "C:\Program Files\Inkscape\share\inkscape\extensions\Mathink"

moluscus commented 4 years ago

I don't know why but it is related to the file permissions. I found a way to make it work by adding write permission only instead of full control.

So now it's working and i'm really glad, thank you a lot for your help on this.

All the best.