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 6797743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:38:47+00:00 2026-05-26T18:38:47+00:00

the code here below: #!/usr/bin/env python import wx class MyForm(wx.Frame): def __init__(self): wx.Frame.__init__(self, None,

  • 0

the code here below:

#!/usr/bin/env python

import wx

class MyForm(wx.Frame):

    def __init__(self):
        wx.Frame.__init__(self, None, wx.ID_ANY,
                          "File and Folder Dialogs Tutorial")
        panel = wx.Panel(self, wx.ID_ANY)

        saveFileDlgBtn = wx.Button(panel, label="Show SAVE FileDialog")
        saveFileDlgBtn.Bind(wx.EVT_BUTTON, self.onSaveFile)

        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(saveFileDlgBtn, 0, wx.ALL|wx.CENTER, 5)
        panel.SetSizer(sizer)



    def onSaveFile(self, event):
        """
        Create and show the Save FileDialog
        """
        dlg = wx.FileDialog(
            self, message="Save file as ...",
            defaultDir=".",
            defaultFile="", wildcard="*.*", style=wx.SAVE
            )
        if dlg.ShowModal() == wx.ID_OK:
            path = dlg.GetPath()
            print path
            fp = open(path, 'w')
            fp.write("bau bau")
            fp.close()

        dlg.Destroy()


if __name__ == "__main__":
    app = wx.App(False)
    frame = MyForm()
    frame.Show()
    app.MainLoop()

gives the following message on my terminal when I try to save the file by giving a new name test.txt through the file dialog widget:

(python:16795): Gtk-WARNING **: Unable to retrieve the file info for `file:///home/roberto/python/test.txt': Error stating file '/home/roberto/python/test.txt': No such file or directory

Despite this message, the file is saved correctly, but I would like to understand why the message occurs and how to avoid it. Is this something which depends on gtk libraries installed in my system? I am running a debian testing with gtk version 2.24 and python-wxgtk2.8.

Thank you very much.

Roberto

  • 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-26T18:38:48+00:00Added an answer on May 26, 2026 at 6:38 pm

    I’ve read that some of the wxPython distros on Linux have debugging turned on, which is great for knowing why something goes wrong, but it also shows all the gtk warnings. It sounds like it’s saving the file correctly, so you probably don’t need to worry about it. You can ask on the wxPython mailing list for a more technical explanation.

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

Sidebar

Related Questions

Im using python markdown for my django project, when i have the value #/usr/bin/env
i have some code in Ruby here below: class A @@lock = Monitor.new class
I'm trying to update an element in the XML document below: Here's the code:
I commented my code below to reflect what I am attempting to do here.
Hey all. Here is the scenario. I have the below code, and I'm needing
I have this piece of code here below: $fq.= + (fritidsboende_uth_from:[$fritids_uth_from TO *] AND
What is the difference between those three code samples here below? Is one better
enter code here I have a table on SQL server 2005 with bigint primary
The code here is X++. I know very little about it, though I am
enter code here Hi All, I have a simple windows service application that connects

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.