Giter Club home page Giter Club logo

Comments (6)

wanglongqi avatar wanglongqi commented on May 24, 2024

What version of inkscape you are using? string-escape is an encoding in Python 2.

from writetex.

NazBen avatar NazBen commented on May 24, 2024

Hi,

I'm using the "almost" last version: 0.92.1? I can upgrade to 0.92.2 to see how it goes.

from writetex.

wanglongqi avatar wanglongqi commented on May 24, 2024

I never heard inkscape upgraded to python 3. You can try to change all "string-escape" in writetex.py into "unicode_escape".

from writetex.

NazBen avatar NazBen commented on May 24, 2024

I did so and got this instead:

Traceback (most recent call last):
  File "writetex.py", line 347, in <module>
    e.affect()
  File "C:\Program Files\Inkscape\share\extensions\inkex.py", line 285, in affect
    self.output()
  File "C:\Program Files\Inkscape\share\extensions\inkex.py", line 272, in output
    self.document.write(sys.stdout)
  File "src\lxml\lxml.etree.pyx", line 2048, in lxml.etree._ElementTree.write (src\lxml\lxml.etree.c:65677)
  File "src\lxml\serializer.pxi", line 729, in lxml.etree._tofilelike (src\lxml\lxml.etree.c:139689)
  File "src\lxml\lxml.etree.pyx", line 324, in lxml.etree._ExceptionContext._raise_if_stored (src\lxml\lxml.etree.c:12150)
  File "src\lxml\serializer.pxi", line 646, in lxml.etree._FilelikeWriter.write (src\lxml\lxml.etree.c:138305)
TypeError: write() argument must be str, not bytes

from writetex.

wanglongqi avatar wanglongqi commented on May 24, 2024

It seems the inkscape version you installed is using Python 3. I cannot reproduce this error on my machine. Maybe you can try to remove all .decode('string-escape').

from writetex.

NazBen avatar NazBen commented on May 24, 2024

Hi,

Sorry for the late response. The problem was in the installation of Inkscape. Inkscape provides python 2.7 in the installation, but because I already had python I unchecked the installation of python with inkscape. Thus, when using WriteTex, it used my own python which was python 3...

I installed the latest version of Inkscape with its python interpretor and it works now.

Thanks for the help. Great extension!

from writetex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.