tabula has no attribute 'read_pdf' - in VSCode.
See original GitHub issueSummary of your issue
From VSCode, none of the tabula methods and attributes work. It seems like they work from anaconda prompt, though.
Traceback (most recent call last):
File "c:\Users\User\.spyder-py3\JacobPDF\PDFTableToExcel.py", line 11, in <module>
df = tabula.read_pdf("./Import/Ground Floor Finishes Plan.pdf", pages='all')
AttributeError: module 'tabula' has no attribute 'read_pdf'
Environment
Write and check your environment. Please paste outputs of specific commands if required.
- Paste the output of
import tabula; tabula.environment_info()
on Python REPL: ?
Python version:
3.7.3 (default, Apr 24 2019, 15:29:51) [MSC v.1915 64 bit (AMD64)]
Java version:
java version "1.8.0_211"
Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
Java HotSpot(TM) Client VM (build 25.211-b12, mixed mode)
tabula-py version: 1.3.1
platform: Windows-10-10.0.17134-SP0
uname:
uname_result(system='Windows', node='LAPTOP', release='10', version='10.0.17134', machine='AMD64', processor='Intel64 Family 6 Model 142 Stepping 10, GenuineIntel')
linux_distribution: ('', '', '')
mac_ver: ('', ('', '', ''), '')
What did you do when you faced the problem?
I pasted in the example code from the docs and tried it. I checked that I have tabula-py and not tabula. Interestingly, it appears to work in Anaconda prompt, but it doesn’t work in VSCode.
Example code:
import tabula
inPDF = 'Ground Floor Finishes Plan.pdf'
df = tabula.read_pdf("./Import/Ground Floor Finishes Plan.pdf", pages='all')
tabula.convert_into(inPDF, "output.csv", output_format="csv", pages='all')
Output:
PS C:\Users\User\.spyder-py3> python -u "c:\Users\User\.spyder-py3\JacobPDF\PDFTableToExcel.py"
Traceback (most recent call last):
File "c:\Users\User\.spyder-py3\JacobPDF\PDFTableToExcel.py", line 11, in <module>
df = tabula.read_pdf("./Import/Ground Floor Finishes Plan.pdf", pages='all')
AttributeError: module 'tabula' has no attribute 'read_pdf'
PS C:\Users\User\.spyder-py3>
What did you intend it to be?
I intended it to create a .csv file.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Python3 : module 'tabula' has no attribute 'read_pdf'
The code reads the pdf with Tabula and provides the table content as a output. I've tried : import tabula df = tabula.read_pdf("my_pdf")...
Read more >tabula-py - Read the Docs
tabula -py is a simple Python wrapper of tabula-java, which can read table of PDF. You can read tables from PDF.
Read more >tabula-py - PyPI
tabula -py is a simple Python wrapper of tabula-java, which can read tables in a PDF. You can read tables from a PDF...
Read more >[782]AttributeError: module 'tabula' has no attribute 'read_pdf'
[782]AttributeError: module 'tabula' has no attribute 'read_pdf' ; from tabula import read_pdf ; pip uninstall tabula pip3 install tabula-py · 2.
Read more >AttributeError module 'pandas' has no attribute 'read_csv'
To solve the error, make sure to rename any local files named pandas.py . attributeerror module pandas has no attribute read csv. Here...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Don’t you have the file named
tabula.py
in your project?No response from reporter . Will close