Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6318001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T15:35:34+00:00 2026-05-24T15:35:34+00:00

So here is my import: from pyPdf import PdfFileWriter, PdfFileReader Here is were I

  • 0

So here is my import:

from pyPdf import PdfFileWriter, PdfFileReader

Here is were I write my pdf:

filenamer = filename + '.pdf'
pdf = PdfPages(filenamer)

(great naming convention, I know!)

I write some things to it.

I close it here:

pdf.close()

Here is where I try and read it:

input1 = PdfFileReader(file(filenamer, "rb"))

And here is the error:

Traceback (most recent call last):
  File "./datamine.py", line 405, in <module>
    input1 = PdfFileReader(file(filenamer, "rb"))
TypeError: 'file' object is not callable

I dont understand the error, because I know the file exists, and when I comment out this line, and subsequent lines to input1, the program runs fine.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T15:35:35+00:00Added an answer on May 24, 2026 at 3:35 pm

    It looks like you’ve assigned an open file to the name file, and then you can’t use the builtin any more.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's the deal: A Github repo features a historical import from CVS, divided in
Here's the code I have: from cStringIO import StringIO from lxml import etree xml
BeautifulSoup newbe... Need help Here is the code sample... from mechanize import Browser from
Here is my sample code: from xml.dom.minidom import * def make_xml(): doc = Document()
How to convert a value from nanoseconds to seconds? Here's the code segment: import
I just want to know where am i wrong here: import java.io.*; class Tokens{
I took this script from here : import csv from itertools import izip f
I am currently using the directory walker from Here import os class DirectoryWalker: #
I have this code here import subprocess from time import strftime # Load just
I've got a sketch pulled from here : import processing.opengl.*; float a; void setup()

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.