Comments (5)
can anyone add a test to reproduce this please ? thanks !
from pdfminer.six.
@johnsonice It looks like the error message is incomplete. Can you add the missing pieces, and fix the markup using ``` python
(which starts a multiline code block)?
from pdfminer.six.
I'm trying to do it as well, here's the error I get :
File "C:\Users\Marine\Anaconda3\lib\site-packages\pdfminer\tools\pdf2txt.py", line 114, in main
interpreter.process_page(page)
File "C:\Users\Marine\Anaconda3\lib\site-packages\pdfminer\pdfinterp.py", line 851, in process_page
self.device.begin_page(page, ctm)
File "C:\Users\Marine\Anaconda3\lib\site-packages\pdfminer\pdfdevice.py", line 155, in begin_page
self.outfp.write(utils.make_compat_bytes(output))
TypeError: write() argument must be str, not bytes
I launched the command like this :
pdf2txt.py -c UTF-8 -o artscient -t tag structure_article_scientifique.pdf
Could it be a problem with the codec value? I also tried to remove the codec parameter, the same error appears.
from pdfminer.six.
Having the same issue both on python2 and python3.6
from pdfminer.six.
Closing this because there is nothing reproducible. Feel free to reopen if the problem still exists.
I've tested if the function behaves correctly on Python3.7 and it does.
class TestCompatStr():
def test_bytes(self):
s = 'Hello World!'
b = s.encode()
ret = make_compat_str(b)
assert_equal(s, ret)
def test_str(self):
s = 'Hello World!'
ret = make_compat_str(s)
assert_equal(s, ret)
from pdfminer.six.
Related Issues (20)
- Bug: pdfminer.six fails to read certain japanese fonts and returns cid value HOT 3
- Check licenses in cicd
- Switch to pyproject.toml
- I want to take bold text from a .pdf file and i have a code that works perfectly wow but in one kind of pdf it did't work can anyone help me with that HOT 1
- Incorrect character extraction, CID string returned HOT 2
- TypeError: 'int' object is not iterable HOT 1
- Support zipped jpegs
- Detection of ligatures - fi problem
- Unused `rsrcmgr` field on `PDFDevice`
- interpreter.process_page crashes on certain pdfs
- 𝜒 extraction issue
- "PDFDocument is not initialized" when startxref is invalid
- Out-of-order coordinates HOT 4
- pdfminer cause python3 process coredump.... HOT 1
- UnicodeEncodeError when piping/Tee-Object on Windows
- Parse Image on the fly
- Issue with extract_pages Function in pdfminer.six
- DEPRECATION: pdfminer-six -VERSION-
- How to add fonts
- ModuleNotFoundError: No module named 'pdfminer'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdfminer.six.