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 1 1620
Thomas Guettler wrote: 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):
File "<stdin>", line 1, in ?
AttributeError: keys d.update({"a":1, "b":2})
dict.update() tries to access the keys method, so you should check if
this_ids_dict is really a dictionary.
Peter This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Robin Becker |
last post by:
def raise_an_error():
a = 3
b = 4
c = 0
try:
a = a/c
except:
import sys, cgitb, traceback, inspect
tbt,tbv,tb = sys.exc_info()
print...
|
by: Thomas Guettler |
last post by:
Hi,
the line numbers of inspect.getinnerframes are
different from traceback.format_exception.
This results in wrong lines being shown in cgitb.
An example is below.
I looked at the...
|
by: Michael P. Soulier |
last post by:
Hello,
For a GUI app I've tried resetting sys.excepthook to my own
exceptionhandler bound method, which accepts a type, value and traceback
object.
Now, the traceback module has print_exc...
|
by: Skink |
last post by:
hi,
I'm using boost::python for calling some python code and when the
exception is thrown I want to get type, value and traceback of it.
The problem is with traceback: I got only *one* frame...
|
by: billiejoex |
last post by:
Hi there,
I'm facing a case where I need to get the traceback outptut when
occurring an exception.
I solved such problem by using traceback module in conjunction with
StringIO:
import...
|
by: gregpinero |
last post by:
I'm running code via the "exec in context" statement within a much
larger program. What I would like to do is capture any possible
errors and show a pretty traceback just like the Python...
|
by: Sami |
last post by:
Hello,
In the Python book that I am using to learn the language it says that
the traceback.print_exc() can be used to stop exception propagation and
make the program keep running.
Here is a...
|
by: Thomas Guettler |
last post by:
Hi,
How can you get the traceback of the inner exception?
try:
try:
import does_not_exit
except ImportError:
raise Exception("something wrong")
except:
|
by: James Mills |
last post by:
On Fri, Oct 31, 2008 at 8:49 AM, mark floyd <emfloyd2@gmail.comwrote:
Mark, this is correct behavior. You have
3 positional arguments in the function
definition. You _must_ aupply _all_ 3
of...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
| |