Coder Social home page Coder Social logo

RuntimeError: pStyle: NormalWeb about docx2md HOT 6 OPEN

digi604 avatar digi604 commented on August 17, 2024
RuntimeError: pStyle: NormalWeb

from docx2md.

Comments (6)

marceletchart avatar marceletchart commented on August 17, 2024 1

@dogatana
I got the same error following this thread. I pulled the repo and tried a change to setup.py and it worked.
I changed this line:
readme = os.path.join(os.path.dirname(__file__), "README.rst")
to
readme = os.path.join(os.path.dirname(__file__), "README.md")

Not sure if that'll help everyone, but it resolved the utf-8 decode error above.

from docx2md.

he-tizotte avatar he-tizotte commented on August 17, 2024 1

Dear all,

I tested a hotfix at the line 198 of converter.py , by replacing
style[0]=="a"
by
isinstance(style[0], str)
and the md file is correctly generated.

Cheers,
converter.py.patch

from docx2md.

digi604 avatar digi604 commented on August 17, 2024

Free_Test_Data_1MB_DOCX-1.docx

from docx2md.

dogatana avatar dogatana commented on August 17, 2024

HI, @digi604

Thank you for your report.
I added some features to handle the issue.
I appreciate if you could try the new one that is on this repository.

pip install git+https://github.com/dogatana/docx2md.git

from docx2md.

DanCranford avatar DanCranford commented on August 17, 2024

Hey there -

I ran into a similar issue but with a Runtime Error: pStyle: ListParagraph. I tried to install the repo you posted in this thread but got an error with that.

Collecting git+https://github.com/dogatana/docx2md.git
  Cloning https://github.com/dogatana/docx2md.git to /tmp/pip-req-build-v4w2zzze
  Running command git clone --filter=blob:none --quiet https://github.com/dogatana/docx2md.git /tmp/pip-req-build-v4w2zzze
  Resolved https://github.com/dogatana/docx2md.git to commit b6cfe1c57b1362e77dafbd7beae87b3d3fc834c5
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-req-build-v4w2zzze/setup.py", line 13, in <module>
          README = open(readme).read()
        File "/opt/conda/lib/python3.9/codecs.py", line 322, in decode
          (result, consumed) = self._buffer_decode(data, self.errors, final)
      UnicodeDecodeError: 'utf-8' codec can't decode byte 0x81 in position 1716: invalid start byte
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Note: you may need to restart the kernel to use updated packages.

from docx2md.

dogatana avatar dogatana commented on August 17, 2024

@DanCranford

Thank you for the report.
The above messages seemds to show that pip tried to process README-jp.md and could not handle it on your environment.
I rename README-jp.md to jp-README.md and apprecieate if you could try again.

from docx2md.

Related Issues (3)

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.