question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

tabula has no attribute 'read_pdf' - in VSCode.

See original GitHub issue

Summary 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:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
chezoucommented, Jun 14, 2019

Don’t you have the file named tabula.py in your project?

0reactions
chezoucommented, Jul 11, 2019

No response from reporter . Will close

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found