[Twisted-Python] Confusing traceback from mktap.py
Greetings, I have somehow caused my Twisted application to become un-TAPable. Running it through mktap.py (in the same fashion as when it did work) results in the following traceback. Traceback (most recent call last): File "mktap.py", line 30, in ? run() File "C:\Python22\Lib\site-packages\twisted\scripts\mktap.py", line 178, in run a.save() File "C:\Python22\Lib\site-packages\twisted\internet\app.py", line 634, in save dumpFunc(self, f) File "C:\Python22\Lib\site-packages\twisted\internet\app.py", line 616, in dumpFunc _dump(obj, file, 1) TypeError: 'NoneType' object is not callable Unfortunately, I don't have an old version to go back to, and I don't know enough about Twisted to know where I should look for a problem. I did try converting my TAP plug-in to just run, which resulted in the same error. At this point, I'm so completely lost that I'm not sure what, if any, or my source code I should be asking about. If someone on this list can offer me a suggestion about where I might start looking for a problem, it would be very much appreciated. (In case it makes a difference, I'm using Windows 98 and ActivePython 2.2.) Thank you for your time. Sincerely, Bradley Peters.
On Tue, Mar 11, 2003 at 04:46:44PM -0600, Bradley Duane Peters wrote:
Greetings,
I have somehow caused my Twisted application to become un-TAPable. Running it through mktap.py (in the same fashion as when it did work) results in the following traceback.
Traceback (most recent call last): File "mktap.py", line 30, in ? run() File "C:\Python22\Lib\site-packages\twisted\scripts\mktap.py", line 178, in run a.save() File "C:\Python22\Lib\site-packages\twisted\internet\app.py", line 634, in save dumpFunc(self, f) File "C:\Python22\Lib\site-packages\twisted\internet\app.py", line 616, in dumpFunc _dump(obj, file, 1) TypeError: 'NoneType' object is not callable
You shouldn't be able to induce this error with your code. I can't actually imagine -how- this might be induced, apparently "cPickle.dump" has gotten itself to be None. Perhaps you have "cPickle.py" in your source, with "dump = None" in it? Could you try this interactively, preferably in your package's directory, and/or where you ran mktap from? import cPickle print cPickle.__file__, cPickle.dump
Unfortunately, I don't have an old version to go back to, and I don't know enough about Twisted to know where I should look for a problem.
Did you upgrade your app, or Twisted? BTW, random piece of advise, always develop with some sort of RCS software, be it CVS or something else. It's great for situations where you can't track down what has broken something... you just back out changes until it works again. Jp -- A disciple of another sect once came to Drescher as he was eating his morning meal. "I would like to give you this personality test," said the outsider, "because I want you to be happy." Drescher took the paper that was offered him and put it into the toaster: "I wish the toaster to be happy, too." -- up 8 days, 15:59, 8 users, load average: 0.22, 0.13, 0.04
On 11 Mar 2003 at 19:10, Jp Calderone wrote:
Perhaps you have "cPickle.py" in your source, with "dump = None" in it? Could you try this interactively, preferably in your package's directory, and/or where you ran mktap from?
import cPickle print cPickle.__file__, cPickle.dump
Unless it's part of something imported from Twisted, I haven't used cPickle.py in my source and I can't find anything like "dump = None". I tried the two lines above in the Python shell starting from where I run mktap from, and from my package's directory. In all cases, it resulted in the following traceback: Traceback (most recent call last): File "<stdin>", line 1, in ? AttributeError: 'module' object has no attribute '__file__'
Did you upgrade your app, or Twisted?
I had just made some modifications to my app, and was running it through mktap so I could test them. I didn't make any changes to Twisted itself. Thanks, Bradley Peters.
participants (2)
-
Bradley Duane Peters
-
Jp Calderone