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

  • Home
  • SEARCH
  • 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 8978825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:42:05+00:00 2026-06-15T19:42:05+00:00

When running my program that makes the function call self.getFileButton = Button(self, text =

  • 0

When running my program that makes the function call

self.getFileButton = Button(self,
                            text = "...",
                            command =
                            tkFileDialog.askopenfilename(mode="r+b", **self.file_opt))

I get the error

File "C:/Documents and Settings/l/My Documents/Python/csv_GUI.py", line 33, in create_widgets
tkFileDialog.askopenfilename(mode="r+b", **self.file_opt))

AttributeError: selectFile instance has no attribute ‘file_opt’

  • 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-06-15T19:42:06+00:00Added an answer on June 15, 2026 at 7:42 pm

    Do you actually have a file_opt member defined in, e.g., your __init__ method, or elsewhere?

    If the problem is that you are defining one, but not until after you’ve done the getFileButton, can you just rearrange the order? If not, mgilson’s solution is the right one. But otherwise, it’s much simpler.

    And if you don’t have a file_opt member anywhere, it’s even simpler: Don’t try to pass something that doesn’t exist.

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

Sidebar

Related Questions

I am looking for a method to monitor a running program that I have
When running a Python program that reads from stdin, I get the following error:
I am running a Java program that connect 1000 clients to a server at
I'm running a java program that uses many vectors. I'm afraid my use of
I have a java program that is running in the background(Windows). I would like
I have a Matlab program that is running longer than I'd like it to.
I have a task killer program that has a listbox of current running processes.
I now have a running Java program which only lacks of the final step,that
I have a python script that ends with running a program (iexpress.exe) in a
I noticed that my program was crashing because it was running out of memory.

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.