Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #65875 > unrolled thread

Error getting while running python function

Started byJaydeep Patil <patil.jay2009@gmail.com>
First post2014-02-10 20:07 -0800
Last post2014-02-11 09:59 +0000
Articles 6 — 3 participants

Back to article view | Back to comp.lang.python


Contents

  Error getting while running python function Jaydeep Patil <patil.jay2009@gmail.com> - 2014-02-10 20:07 -0800
    Re: Error getting while running python function Chris Angelico <rosuav@gmail.com> - 2014-02-11 15:12 +1100
      Re: Error getting while running python function Jaydeep Patil <patil.jay2009@gmail.com> - 2014-02-10 20:34 -0800
        Re: Error getting while running python function Chris Angelico <rosuav@gmail.com> - 2014-02-11 16:01 +1100
    Re: Error getting while running python function Jaydeep Patil <patil.jay2009@gmail.com> - 2014-02-10 20:26 -0800
      Re: Error getting while running python function Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-02-11 09:59 +0000

#65875 — Error getting while running python function

FromJaydeep Patil <patil.jay2009@gmail.com>
Date2014-02-10 20:07 -0800
SubjectError getting while running python function
Message-ID<6e857925-8571-438b-84a6-bf53a3488037@googlegroups.com>
I have defined one function as below.

def InfoDir(msg):
        msg1 = wx.MessageDialog(msg)
        msg1.ShowModal()
        msg1.Destroy()

InfoDir("Testing")


It gives below error.
    msg1 = wx.MessageDialog(msg)
  File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_windows.py", line 2922, in __init__
    _windows_.MessageDialog_swiginit(self,_windows_.new_MessageDialog(*args, **kwargs))
TypeError: Required argument 'message' (pos 2) not found

Process finished with exit code 1



Please give me solution for this.

[toc] | [next] | [standalone]


#65876

FromChris Angelico <rosuav@gmail.com>
Date2014-02-11 15:12 +1100
Message-ID<mailman.6647.1392091964.18130.python-list@python.org>
In reply to#65875
On Tue, Feb 11, 2014 at 3:07 PM, Jaydeep Patil <patil.jay2009@gmail.com> wrote:
> I have defined one function as below.
>
> def InfoDir(msg):
>         msg1 = wx.MessageDialog(msg)
>         msg1.ShowModal()
>         msg1.Destroy()
>
> InfoDir("Testing")
>
>
> It gives below error.
>     msg1 = wx.MessageDialog(msg)
>   File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_windows.py", line 2922, in __init__
>     _windows_.MessageDialog_swiginit(self,_windows_.new_MessageDialog(*args, **kwargs))
> TypeError: Required argument 'message' (pos 2) not found
>
> Process finished with exit code 1

It looks like you're missing a required argument :)

http://www.wxpython.org/docs/api/wx.MessageDialog-class.html#__init__

Try passing it a parent window as well as the message.

ChrisA

[toc] | [prev] | [next] | [standalone]


#65880

FromJaydeep Patil <patil.jay2009@gmail.com>
Date2014-02-10 20:34 -0800
Message-ID<4e284506-52f5-4bb5-bb21-caf21b7742b3@googlegroups.com>
In reply to#65876
On Tuesday, 11 February 2014 09:42:35 UTC+5:30, Chris Angelico  wrote:
> On Tue, Feb 11, 2014 at 3:07 PM, Jaydeep Patil <patil.jay2009@gmail.com> wrote:
> 
> > I have defined one function as below.
> 
> >
> 
> > def InfoDir(msg):
> 
> >         msg1 = wx.MessageDialog(msg)
> 
> >         msg1.ShowModal()
> 
> >         msg1.Destroy()
> 
> >
> 
> > InfoDir("Testing")
> 
> >
> 
> >
> 
> > It gives below error.
> 
> >     msg1 = wx.MessageDialog(msg)
> 
> >   File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_windows.py", line 2922, in __init__
> 
> >     _windows_.MessageDialog_swiginit(self,_windows_.new_MessageDialog(*args, **kwargs))
> 
> > TypeError: Required argument 'message' (pos 2) not found
> 
> >
> 
> > Process finished with exit code 1
> 
> 
> 
> It looks like you're missing a required argument :)
> 
> 
> 
> http://www.wxpython.org/docs/api/wx.MessageDialog-class.html#__init__
> 
> 
> 
> Try passing it a parent window as well as the message.
> 
> 
> 
> ChrisA

@ Chris:
There is not parent window such. I just write a simple function to define.
There is no class.
Is it possible to work like the way i am doing?

Regards
Jay

[toc] | [prev] | [next] | [standalone]


#65883

FromChris Angelico <rosuav@gmail.com>
Date2014-02-11 16:01 +1100
Message-ID<mailman.6650.1392094879.18130.python-list@python.org>
In reply to#65880
On Tue, Feb 11, 2014 at 3:34 PM, Jaydeep Patil <patil.jay2009@gmail.com> wrote:
> There is not parent window such. I just write a simple function to define.
> There is no class.
> Is it possible to work like the way i am doing?

You could try reading the docs; there might be a way to say "no parent
window" (maybe pass it None), but you can't simply omit parameters.

Start with the docs. They're friendly.

ChrisA

[toc] | [prev] | [next] | [standalone]


#65879

FromJaydeep Patil <patil.jay2009@gmail.com>
Date2014-02-10 20:26 -0800
Message-ID<ebb75c7f-e4be-4880-b08f-3115fb0ded63@googlegroups.com>
In reply to#65875
On Tuesday, 11 February 2014 09:37:23 UTC+5:30, Jaydeep Patil  wrote:
> I have defined one function as below.
> 
> 
> 
> def InfoDir(msg):
> 
>         msg1 = wx.MessageDialog(msg)
> 
>         msg1.ShowModal()
> 
>         msg1.Destroy()
> 
> 
> 
> InfoDir("Testing")
> 
> 
> 
> 
> 
> It gives below error.
> 
>     msg1 = wx.MessageDialog(msg)
> 
>   File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_windows.py", line 2922, in __init__
> 
>     _windows_.MessageDialog_swiginit(self,_windows_.new_MessageDialog(*args, **kwargs))
> 
> TypeError: Required argument 'message' (pos 2) not found
> 
> 
> 
> Process finished with exit code 1
> 
> 
> 
> 
> 
> 
> 
> Please give me solution for this.



Is anybody answer my query?

Regards
Jay

[toc] | [prev] | [next] | [standalone]


#65896

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2014-02-11 09:59 +0000
Message-ID<mailman.6656.1392112810.18130.python-list@python.org>
In reply to#65879
On 11/02/2014 04:26, Jaydeep Patil wrote:
> On Tuesday, 11 February 2014 09:37:23 UTC+5:30, Jaydeep Patil  wrote:
>> I have defined one function as below.
>>
>>
>>
>> def InfoDir(msg):
>>
>>          msg1 = wx.MessageDialog(msg)
>>
>>          msg1.ShowModal()
>>
>>          msg1.Destroy()
>>
>>
>>
>> InfoDir("Testing")
>>
>>
>>
>>
>>
>> It gives below error.
>>
>>      msg1 = wx.MessageDialog(msg)
>>
>>    File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_windows.py", line 2922, in __init__
>>
>>      _windows_.MessageDialog_swiginit(self,_windows_.new_MessageDialog(*args, **kwargs))
>>
>> TypeError: Required argument 'message' (pos 2) not found
>>
>>
>>
>> Process finished with exit code 1
>>
>>
>>
>>
>>
>>
>>
>> Please give me solution for this.
>
>
>
> Is anybody answer my query?
>
> Regards
> Jay
>

Come on you lot, pull your bloody fingers out, I've been waiting for 
NINETEEN minutes!!!

Would you please read and action this 
https://wiki.python.org/moin/GoogleGroupsPython to prevent us seeing the 
double line spacing above, thanks.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.

Mark Lawrence

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web