Linenumbers of traceback wrong

T

Thomas Guettler

Hi,

Sometimes the linenumbers of a traceback are wrong.

See this traceback. I don't use any attribute "key" here.
The method search_dict does not use this attribute, too.

Traceback (most recent call last):
File "/mnt/raid/modarch/workflow/python/lib/python2.3/site-packages/quixote/publish.py", line 553, in publish
output = self.process_request(request, env)
File "/mnt/raid/modarch/workflow/python/lib/python2.3/site-packages/quixote/publish.py", line 535, in process_requ
output = self.try_publish(request, env.get('PATH_INFO', ''))
File "/mnt/raid/modarch/workflow/lib/ZEOClientPublisher.py", line 198, in try_publish
return Publisher.try_publish(self, request, path)
File "/mnt/raid/modarch/workflow/python/lib/python2.3/site-packages/quixote/publish.py", line 483, in try_publish
output = object(request)
File "/mnt/raid/modarch/workflow/lib/WorkflowServer.py", line 726, in search
buchungsdatum_bis))
File "/mnt/raid/modarch/workflow/lib/SearchCatalog.py", line 302, in search_dict
ids_dict.update(this_ids_dict)
AttributeError: keys

Python 2.3.2 (#1, Nov 20 2003, 12:57:28)
[GCC 2.95.3 20010315 (SuSE)] on linux2


"keys" get used here:

def search(self, attr, value, maxvalue=None):
result_dict=self.search_dict(attr, value, maxvalue)
return result_dict.keys()

ids_dict was created with "ids_dict={}"

Any hints?

Thomas
 
P

Peter Otten

Thomas said:
Sometimes the linenumbers of a traceback are wrong.

See this traceback. I don't use any attribute "key" here.
The method search_dict does not use this attribute, too.

Traceback (most recent call last):
File
"/mnt/raid/modarch/workflow/python/lib/python2.3/site-packages/quixote/publish.py",
line 553, in publish
output = self.process_request(request, env)
File
"/mnt/raid/modarch/workflow/python/lib/python2.3/site-packages/quixote/publish.py",
line 535, in process_requ
output = self.try_publish(request, env.get('PATH_INFO', ''))
File "/mnt/raid/modarch/workflow/lib/ZEOClientPublisher.py", line 198,
in try_publish
return Publisher.try_publish(self, request, path)
File
"/mnt/raid/modarch/workflow/python/lib/python2.3/site-packages/quixote/publish.py",
line 483, in try_publish
output = object(request)
File "/mnt/raid/modarch/workflow/lib/WorkflowServer.py", line 726, in
search
buchungsdatum_bis))
File "/mnt/raid/modarch/workflow/lib/SearchCatalog.py", line 302, in
search_dict
ids_dict.update(this_ids_dict)
AttributeError: keys

Python 2.3.2 (#1, Nov 20 2003, 12:57:28)
[GCC 2.95.3 20010315 (SuSE)] on linux2


"keys" get used here:

def search(self, attr, value, maxvalue=None):
result_dict=self.search_dict(attr, value, maxvalue)
return result_dict.keys()

ids_dict was created with "ids_dict={}"

Any hints?
Consider:
d = {1:2, 3:4}
d.update(["a", "b"])
Traceback (most recent call last):

dict.update() tries to access the keys method, so you should check if
this_ids_dict is really a dictionary.

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,183
Messages
2,570,967
Members
47,517
Latest member
Andres38A1

Latest Threads

Top