After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 535572 - "NoneType' object is not callable" warning on console
"NoneType' object is not callable" warning on console
Status: RESOLVED FIXED
Product: postr
Classification: Other
Component: General
git master
Other Linux
: Normal minor
: ---
Assigned To: Postr Maintainers
Postr Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-05-29 19:56 UTC by Jakub 'Livio' Rusinek
Modified: 2012-10-04 07:37 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jakub 'Livio' Rusinek 2008-05-29 19:56:58 UTC
postr causes no problem, but when closing, show line below in terminal.

Exception exceptions.TypeError: "'NoneType' object is not callable" in  ignored
Comment 1 Martin Quested 2008-06-27 10:20:05 UTC
I get this error too (and about 10 small windows appear and then disappear too) if I run the program from the command line, while in the directory where the executable is.  However, if I run the program from a menu shortcut, I don't get the windows.  No idea if the exception is thrown though.

Answers are suggested here: http://mail.python.org/pipermail/python-list/2003-March/192239.html
Comment 2 Germán Poo-Caamaño 2009-11-04 17:12:12 UTC
Here is the output for postr.stable (0.12.3)

~/postr.stable$ ./postr 
/home/gpoo/code/bzr/postr.stable/src/flickrest.py:18: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import logging, md5, os, mimetools, urllib
Unhandled error in Deferred:
Traceback (most recent call last):
  • File "/home/gpoo/code/bzr/postr.stable/src/proxyclient.py", line 118 in connectionLost
    self.factory.noPage(reason)
  • File "/home/gpoo/code/bzr/postr.stable/src/proxyclient.py", line 281 in noPage
    self.deferred.errback(reason)
  • File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 269 in errback
    self._startRunCallbacks(fail)
  • File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 312 in _startRunCallbacks
    self._runCallbacks() --- <exception caught here> ---
  • File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 328 in _runCallbacks
    self.result = callback(self.result, *args, **kw)
  • File "/home/gpoo/code/bzr/postr.stable/src/StatusBar.py", line 52 in error
    dialog = ErrorDialog(self.get_toplevel())
  • File "/home/gpoo/code/bzr/postr.stable/src/ErrorDialog.py", line 26 in __init__
    message_format="An error occurred")
exceptions.TypeError: parent should be a GtkWindow or None
Exception TypeError: "'NoneType' object is not callable" in  ignored


And here is the output for postr.dev (rev 279):
~/code/bzr/postr.dev$ ./postr 
/home/gpoo/code/bzr/postr.dev/src/flickrest.py:18: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import logging, md5, os, mimetools, urllib
[Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionLost'>: Connection to the other side was lost in a non-clean fashion: Connection lost.
]
Exception TypeError: "'NoneType' object is not callable" in  ignored
Comment 3 Germán Poo-Caamaño 2012-10-04 07:37:43 UTC
This was odd.  The issue was triggered by importing the module bsddb3 inside a function.  Now it is fixed in master.

Here is the fix:

diff --git a/src/util.py b/src/util.py
index bf58995..5974ae1 100644
@@ -17,7 +17,7 @@
 
 import os
 from gi.repository import Gtk, GdkPixbuf
-
+import bsddb3
 
 def greek(size):
     """Take a quantity (like 1873627) and display it in a human-readable rounded
@@ -73,7 +73,6 @@ def get_buddyicon(flickr, data, size=48):
     """Lookup the buddyicon from the data in @data using @flickr and resize it
     to @size pixels."""
     from twisted.web.client import getPage
-    import bsddb3
 
     global __buddy_cache
     if __buddy_cache is None: