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


Groups > comp.lang.python > #53587

Re: unbound method () must be called with ... instance as first argument (got nothing instead)

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <mohsen@pahlevanzadeh.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'argument': 0.05; 'class,': 0.07; 'method.': 0.07; 'problem?': 0.07; 'skip:" 60': 0.07; 'skip:u 30': 0.07; 'main()': 0.09; 'subject:instance': 0.09; 'subject:method': 0.09; 'skip:q 80': 0.16; 'subject: \n ': 0.16; 'typeerror:': 0.16; 'unbound': 0.16; "where's": 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'all,': 0.19; 'module': 0.19; 'header:In- Reply-To:1': 0.27; 'function': 0.29; 'code': 0.31; 'lines': 0.31; 'file': 0.32; 'run': 0.32; '(most': 0.33; 'subject: (': 0.35; 'subject:with': 0.35; 'skip:u 20': 0.35; 'skip:" 50': 0.36; 'method': 0.36; 'two': 0.37; 'to:addr:python-list': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'changed': 0.39; 'called': 0.40; 'consists': 0.60; 'first': 0.61; 'dear': 0.65; '92,': 0.84; 'subject:nothing': 0.84
DKIM-Signature v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=pahlevanzadeh.org; s=default; h=Content-Transfer-Encoding:Mime-Version:Content-Type:References:In-Reply-To:Date:To:From:Subject:Message-ID; bh=yKdIZvZL8mgua1VIatj4jkJzUzmJBi6nUy6efediN+o=; b=VzxUR3TUL6np8a6zxjDoIeohk6zxNskmzKPy8DTK9NRS+Qo6Wtshn/Jqm1rs6yKOGlQXeXhvQlagIUh+xBDmy/8uJGqcVmNdFs3wEsoR+cdZxHiSJsxVrX+Oie+YDS9jxFIQt6GYHUhZulXg6eZGlZ+Nv5SMQOb7zoOYg1qzWUk=;
Subject Re: unbound method () must be called with ... instance as first argument (got nothing instead)
From Mohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org>
To python-list@python.org
Date Wed, 04 Sep 2013 02:23:20 +0430
In-Reply-To <1378243816.6921.32.camel@debian>
References <1378243816.6921.32.camel@debian>
Content-Type text/plain; charset="UTF-8"
X-Mailer Evolution 3.4.4-4+b1
Mime-Version 1.0
Content-Transfer-Encoding 7bit
X-AntiAbuse This header was added to track abuse, please include it with any abuse report
X-AntiAbuse Primary Hostname - part7.royal-servers.com
X-AntiAbuse Original Domain - python.org
X-AntiAbuse Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse Sender Address Domain - pahlevanzadeh.org
X-Get-Message-Sender-Via part7.royal-servers.com: authenticated_id: mohsen@pahlevanzadeh.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.20.1378245212.5461.python-list@python.org> (permalink)
Lines 40
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1378245212 news.xs4all.nl 15940 [2001:888:2000:d::a6]:40473
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:53587

Show key headers only | View raw


Solved, i changed my connect function to:
QtCore.QObject.connect(self.pushButtonAdd,
QtCore.SIGNAL(_fromUtf8("clicked()")),self.showHideConstructor.showFindMaterials)
On Wed, 2013-09-04 at 02:00 +0430, Mohsen Pahlevanzadeh wrote:
> Dear all,
> 
> I have the following two lines code in my setup frame:
>  ////////////////////// 
>  self.showHideConstructor = ui.interface.interface.ShowHide()
>  QtCore.QObject.connect(self.pushButtonAdd,
> QtCore.SIGNAL(_fromUtf8("clicked()")),self.showHideConstructor,ui.interface.interface.ShowHide.showFindMaterials())
> //////////////////////
> 
> and i have module ui.interface.interface , it contains ShowHide class,
> and it consists showFindMaterials() method.
> 
> When i run program , i get the following traceback :
> ///////////////////////////////////////////
> Traceback (most recent call last):
>   File "./main.py", line 113, in <module>
>     main()
>   File "./main.py", line 94, in main
>     interfaceObj.showMaterials()
>   File "/home/mohsen/codes/amlak/amlak/src/ui/interface/interface.py",
> line 82, in showMaterials
>     self.ui.setupUi(self.Frame)
>   File "/home/mohsen/codes/amlak/amlak/src/ui/materialsFrame.py", line
> 92, in setupUi
>     QtCore.QObject.connect(self.pushButtonAdd,
> QtCore.SIGNAL(_fromUtf8("clicked()")),self.showHideConstructor,ui.interface.interface.ShowHide.showFindMaterials())
> TypeError: unbound method showFindMaterials() must be called with
> ShowHide instance as first argument (got nothing instead)
> ///////////////////////////////////////////////
> 
> Where's problem?
> 
> 
> 

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: unbound method () must be called with ... instance as first argument (got nothing instead) Mohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org> - 2013-09-04 02:23 +0430

csiph-web