allback(message, data)
> File "C:\NordLynx-main\nordlynx.py", line 43, in onMessage
> if 'PrivateKey' not in message["payload"]: return
> KeyError: 'payload'
The problem is with NordLynx, not Python.
> Signature powered by
> WiseStam
in onMessage
if 'PrivateKey' not in message["payload"]: return
KeyError: 'payload'
Signature powered by
<http://www.wisestamp.com/email-install?utm_source=extension&utm_medium=email&utm_campaign=footer>
WiseStamp
<http://www.wisestamp.com/email-install?u
Continuum\Anaconda3\lib\logging\config.py:85: in fileConfig
> _install_loggers(cp, handlers, disable_existing_loggers)
> C:\Continuum\Anaconda3\lib\logging\config.py:254: in _install_loggers
> logger.addHandler(handlers[hand])
> E KeyError: 'handlers.RotatingFileHandler'
>
> how to fix the errors?
>
> thanks
--
https://mail.python.org/mailman/listinfo/python-list
thon generated a key error,
C:\Continuum\Anaconda3\lib\logging\config.py:85: in fileConfig
_install_loggers(cp, handlers, disable_existing_loggers)
C:\Continuum\Anaconda3\lib\logging\config.py:254: in _install_loggers
logger.addHandler(handlers[hand])
E KeyError: 'handlers.Rotating
On 09/05/2013 01:37 AM, Robert Gliguroski wrote:
I have installed OpenERP, an open source ERP software and then I installed an
extension for connecting it to Magento. But when I configure it and try to
connect them, I am getting and error that says:
[snip]
You might try asking at either Stac
Magento. But when I configure it and try to
connect them, I am getting and error that says:
"File "/opt/openerp/v7/server/openerp/modules/registry.py", line 102, in
__getitem__
return self.models[model_name]
KeyError: u'magento.instance'"
This is the function
> Add a
>
> print(newrecord)
>
> before the
>
> dbcur.execute(...)
>
> line and tell us what it shows. I'm guessing that for one of the values in
> it you forgot to call a method written in C, e. g.
>
> >>> [42].pop
>
> >>> type(_)
>
>
> instead of
>
> >>> [42].pop()
> 42
>
Thank you Peter - that
s.py", line 650,
> in escape return escape_item(obj, self.charset) File
> "/usr/local/lib/python3.2/dist-packages/pymysql/converters.py", line 31,
> in escape_item encoder = encoders[type(val)] KeyError: 'builtin_function_or_method'>
>
> I can dump out
ges/pymysql/converters.py", line 31,
in escape_item
encoder = encoders[type(val)]
KeyError:
I can dump out the (dummy) contents of the table using:
for r in dbcur:
print(r)
...so it seems the connection itself is working. User ID has full permissions,
I'm pretty sure the data
don't worry too much about it.
>
>
>
> --
>
> Terry Jan Reedy
I use try and except when I need to raise exceptions e.g.:
try:
value = vm.variables[name]
except KeyError:
raise NameError("variable name not defined in VM's variables")
--
http://mail.python.org/mailman/listinfo/python-list
On 10/6/2012 7:36 AM, Dave Angel wrote:
The distinction in performance between the success and failure modes of
the try/catch isn't nearly as large as one of the other responses might
lead you to believe. For example, a for loop generally terminates with
a raise (of StopIteration exception), an
h: see if the module has already been imported.
> try:
> return sys.modules[name]
> except KeyError:
> pass
>
> I was wondering if the formulation
>
> if name in sys.modules:
> return sys.modules[name]
>
> would be equivalent. IO
Steven D'Aprano scripsit :
> If you expect that most of the time the module will be found, the
> try...except version will be faster. If you expect that most of the time
> the module will not be found, the "if name in" version will be faster.
>
Ok.
In the particular case of __import__, I guess
Günther Dietrich scripsit :
> Somewhere I read a text regarding 'try:' versus 'if'. If you take the
> probabitility into consideration, how many times the test will fail or
> succeed, there are two possibilities: [...]
Ok, thanks for the details!
--
Manuel Pégourié-Gonnard - http://people.mat
already been imported.
>try:
>return sys.modules[name]
>except KeyError:
>pass
>
>I was wondering if the formulation
>
>if name in sys.modules:
>return sys.modules[name]
>
>would be equivalent. IOW, is using try/except here only a mat
gt; # Fast path: see if the module has already been imported. try:
> return sys.modules[name]
> except KeyError:
> pass
>
> I was wondering if the formulation
>
> if name in sys.modules:
> return sys.modules[name]
>
> would be equi
]
except KeyError:
pass
I was wondering if the formulation
if name in sys.modules:
return sys.modules[name]
would be equivalent. IOW, is using try/except here only a matter of
style or a necessity?
I'm suspecting that maybe, in multithreaded environments, the second
o
On Mon, Aug 13, 2012 at 9:51 PM, Blind Anagram wrote:
> Thanks to you both for your responses.
>
> Its an IDE issue of some kind (I am using WING).
>
> When I run under a command prompt (or IDLE) all is well.
Next time, do mention that sort of environmental consideration in the
original post :)
"Chris Angelico" wrote in message
news:mailman.3223.1344857956.4697.python-l...@python.org...
On Mon, Aug 13, 2012 at 9:24 PM, Blind Anagram wrote:
Here is a fairly short bit of code which produces the exception:
for pre in ('12', '13', '14', '15', '21' ):
n = int(pre + '543')
s = str(n *
On Mon, Aug 13, 2012 at 9:38 PM, Steven D'Aprano
wrote:
> Since your code doesn't even import threading, let alone use it, I can't
> imagine how you get an error in threading.
Hey, I try not to get scornful until at least the sixth post :)
ChrisA
--
http://mail.python.org/mailman/listinfo/pytho
On Mon, 13 Aug 2012 12:24:55 +0100, Blind Anagram wrote:
> Here is a fairly short bit of code which produces the exception:
>
> for pre in ('12', '13', '14', '15', '21' ):
> n = int(pre + '543')
> s = str(n * n)
> if len(set(s)) == 9:
> print(n, s)
Um, I don't think so.
>>> for pre
On Mon, Aug 13, 2012 at 9:24 PM, Blind Anagram wrote:
>
> Here is a fairly short bit of code which produces the exception:
>
> for pre in ('12', '13', '14', '15', '21' ):
> n = int(pre + '543')
> s = str(n * n)
> if len(set(s)) == 9:
>print(n, s)
Interesting. I just downloaded a clean 3.3
"Chris Angelico" wrote in message
news:mailman.3222.1344856408.4697.python-l...@python.org...
On Mon, Aug 13, 2012 at 8:36 PM, Blind Anagram wrote:
I thought I would try out Python 3.3 beta 2.
This works well so far but I keep getting the message:
Exception KeyError: KeyError
On Mon, Aug 13, 2012 at 8:36 PM, Blind Anagram wrote:
> I thought I would try out Python 3.3 beta 2.
> This works well so far but I keep getting the message:
>
> Exception KeyError: KeyError(6308,) in 'c:\\Program Files\\Python33\\lib\\threading.py'> ignored
>
&g
I thought I would try out Python 3.3 beta 2.
This works well so far but I keep getting the message:
Exception KeyError: KeyError(6308,) infrom 'c:\\Program Files\\Python33\\lib\\threading.py'> ignored
after some of my python code completes.
Is this an issue worth report
t;>b = book('the tempest',234)
>>>>b
> Traceback (most recent call last):
> File "", line 1, in
> File "", line 11, in __getattr__
> KeyError: '__repr__'
>
> i am missing on a concept here. please enlighten me.
A. You ou
27; %
(object.__getattribute__(self,'name'),object.__getattribute___(self,'price'))
else:
return self.__dict__[attr]
>>>b = book('the tempest',234)
>>>b
Traceback (most recent call last):
File "", line 1, in
File
I got metatype compiled. Thanks for your help
On Wed, Jun 6, 2012 at 6:44 PM, Peter Otten <__pete...@web.de> wrote:
> Phanindra Ramesh Challa wrote:
>
> [Please hit "reply-all" in you email client when you answer a post. That
> way
> it will appear on the mailing list and give more people a chanc
Phanindra Ramesh Challa wrote:
[Please hit "reply-all" in you email client when you answer a post. That way
it will appear on the mailing list and give more people a chance to answer]
> output of the is just the line
> "sizes".
>> and then decide if you to need to change the lookup key or to ad
Phanindra Ramesh Challa wrote:
> I am trying to run a python program. It is giving the KeyError: '13'. I
> have no clue regarding this error.
> this is the python code relevant to the error:
>
> dpi = 100
> bold = 0
> italic = 0
> mono = 0
> comment = &qu
I am trying to run a python program. It is giving the KeyError: '13'. I
have no clue regarding this error.
this is the python code relevant to the error:
dpi = 100
bold = 0
italic = 0
mono = 0
comment = ""
dbname = "font.db"
for o, a in opts:
if o == '-b'
"Gabriel Genellina" writes:
> En Fri, 03 Jun 2011 21:02:56 -0300, Nobody escribió:
>
> > On Fri, 03 Jun 2011 22:08:16 +0200, Wilbert Berendsen wrote:
> >
> >> I find myself all over the place associating objects with each
> >> other using dicts as caches:
> >
> > The general concept is called "m
En Fri, 03 Jun 2011 21:02:56 -0300, Nobody escribió:
On Fri, 03 Jun 2011 22:08:16 +0200, Wilbert Berendsen wrote:
I find myself all over the place associating objects with each other
using
dicts as caches:
The general concept is called "memoization". There isn't an
implementation
in th
Hi,
Many thanks for everyone's explanations and pointers!
thanks!
Wilbert Berendsen
--
http://www.wilbertberendsen.nl/
"You must be the change you wish to see in the world."
-- Mahatma Gandhi
--
http://mail.python.org/mailman/listinfo/python-list
Ben Finney writes:
> It's best to implement Memoize as a Python decorator in one place
> http://wiki.python.org/moin/PythonDecoratorLibrary#Memoize>.
Michele Simionato discusses a better implementation of a Memoize
decorator in the documentation for his useful ‘decorator’ library
http://micheles
ect."""
> try:
> return _cache[obj]
> except KeyError:
> res = _cache[obj] = LargeClass(obj)
> return res
You seem to be looking for the Memoize pattern
https://secure.wikimedia.org/wikipedia/en/wiki/Memoization>.
It's best to
On Fri, 03 Jun 2011 22:08:16 +0200, Wilbert Berendsen wrote:
> I find myself all over the place associating objects with each other using
> dicts as caches:
> Are there other peoply using things like this? Is there a solution like
> this in the standard lib that I'm overlooking?
The general con
Hi,
I find myself all over the place associating objects with each other using
dicts as caches:
something like this:
_cache = {}
def get_something(obj):
"""Returns the frobnicate-plugin for the specified object."""
try:
return _cache[obj]
'NOW'))",
> > (v['pid']),s.UID)
>
> > bid does not exist anymore, but why does the KeyError exception occur
> > when only my sql statement is wrong ?
>
> Sure it's not from this line?
>
> def stats2(db,v,s): db.execute("SELECT * FRO
On Oct 10, 7:59 pm, gert wrote:
> http://code.google.com/p/appwsgi/source/browse/appwsgi/wsgi/order.wsgi
>
> I screwed up some sql statement
>
> INSERT INTO orders (pid,uid,bid,time) VALUES (?,?,2,DATETIME('NOW'))",
> (v['pid']),s.UID)
>
> bid
http://code.google.com/p/appwsgi/source/browse/appwsgi/wsgi/order.wsgi
I screwed up some sql statement
INSERT INTO orders (pid,uid,bid,time) VALUES (?,?,2,DATETIME('NOW'))",
(v['pid']),s.UID)
bid does not exist anymore, but why does the KeyError exception occur
when
Hi Peter,
> It looks like 2.5 has the better error message, but the actual problem is
> the same for both versions. Try changing mylogfileHandler's class to
[handler_mylogfileHandler]
class=handlers.RotatingFileHandler
Many thanks, this worked for me!
Steven
--
http://mail.python.org/mailman/l
Steven Macintyre wrote:
Please don't top-post.
[Diez B. Roggisch]
> For me, that fails with
> NameError: name 'RotatingFileHandler' is not defined
[Steven Macintyre]
> I am using 2.4, could that be the cuase of your issue below.
>
> Ideally, I would like to stay with the 2.4 version and base
s as I am very confused
about
> it now.
>
> I am getting the following error;
>
> Traceback (most recent call last):
> File "/usr/lib/python2.4/logging/config.py", line 191, in fileConfig
> logger.addHandler(handlers[hand])
> KeyError: 'handler_mylogfil
r(handlers[hand])
KeyError: 'handler_mylogfileHandler'
For me, that fails with
mac-dir:tmp deets$ python2.5 test.py
Traceback (most recent call last):
File "test.py", line 6, in
logging.config.fileConfig("logging.conf")
File
"/Library/Frameworks/P
Hi all,
I'm wondering if anyone can assist me with this as I am very confused about
it now.
I am getting the following error;
Traceback (most recent call last):
File "/usr/lib/python2.4/logging/config.py", line 191, in fileConfig
logger.addHandler(handlers[
t be loaded.
>
> > The traceback is:
>
> > File "pickle.pyo", line 1374, in loads
> > File "pickle.pyo", line 858, in load
> > KeyError: 'A'
>
> > Does anybody know this problem. How this can happen and how can I
>
uot;, line 1374, in loads
> File "pickle.pyo", line 858, in load
> KeyError: 'A'
>
>
> Does anybody know this problem. How this can happen and how can I
> avoid it?
Is this reproducible? How? If not I would guess that the file is corrupted.
Peter
--
http://mail.python.org/mailman/listinfo/python-list
e.pyo", line 858, in load
KeyError: 'A'
Does anybody know this problem. How this can happen and how can I
avoid it?
Thanks,
Christof
--
http://mail.python.org/mailman/listinfo/python-list
file, and
> when I try to resume a downloaded file, but if the file is already
> downloaded, and I expect to see the print "File already downloaded"
> message come up, I get a keyerror instead:
>
> Traceback (most recent call last):
> File "C:\Users\Adam\Desktop\d
t;
message come up, I get a keyerror instead:
Traceback (most recent call last):
File "C:\Users\Adam\Desktop\ddd.py", line 26, in
if int(webPage.headers['Content-Length']) == existSize:
File "C:\Python25\lib\rfc822.py", line 384, in __getitem__
return se
--
http://mail.python.org/mailman/listinfo/python-list
[key]) # self.db[key]
File "/usr/lib/python2.5/bsddb/dbutils.py", line 62, in DeadlockWrap
return function(*_args, **_kwargs)
File "/usr/lib/python2.5/bsddb/__init__.py", line 223, in
return _DeadlockWrap(lambda: self.db[key]) # self.db[key]
KeyError: 'http://wiki.
"nyenyec" <[EMAIL PROTECTED]> wrote:
> but it seems to work in Python 2.3.5
>
> Python 2.3.5 (#1, Aug 19 2006, 21:31:42)
> [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
import sys, urllib
print sys.versio
On 7 ene, 15:48, "nyenyec" <[EMAIL PROTECTED]> wrote:
> urllib.quote chokes on unicode in 2.4.4.
>>> urllib.quote(u"\xe9")
> KeyError: u'\xe9'
>
> but it seems to work in Python 2.3.5
>
> Is this a known bug?
See some recent
.1 (Apple Computer, Inc. build 5341)]
> >>> urllib.quote(u"\xe9")
> Traceback (most recent call last):
> File "", line 1, in ?
> File
> "/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/urllib.py",
> line 1117, in quote
&g
ameworks/Python.framework/Versions/2.4//lib/python2.4/urllib.py",
line 1117, in quote
res = map(safe_map.__getitem__, s)
KeyError: u'\xe9'
but it seems to work in Python 2.3.5
Python 2.3.5 (#1, Aug 19 2006, 21:31:42)
[GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
Type "
ok the syntax for next is this:
b = n.findNext
LordLaraby wrote:
> You wrote:
> > i have an
> > href which looks like this:
> >
> > http://www.cnn.com";>
> >
> > here is my code
> > for incident in row('td', {'class':'all'}):
> > n = incident.findNextSibling('a', {
what is the syntax used to find a child of td?
Mike Meyer wrote:
> "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
>
> Please use less whitespace in your posts in the future. There's really
> no need to put two blank lines between sections.
>
> > i have an
> > href which looks like this:
> >
> >
You wrote:
> i have an
> href which looks like this:
>
> http://www.cnn.com";>
>
> here is my code
> for incident in row('td', {'class':'all'}):
> n = incident.findNextSibling('a', {'class': 'btn'})
> link = incident.findNextSibling['href'] + "','"
> an
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
Please use less whitespace in your posts in the future. There's really
no need to put two blank lines between sections.
> i have an
> href which looks like this:
>
> http://www.cnn.com";>
>
> here is my code
> for incident in row('td',
= incident.findNextSibling['href'] + "','"
and the full error is this:
File "/home/felafela/BeautifulSoup.py", line 301, in __getitem__
return self._getAttrMap()[key]
KeyError: 'href'
any idea what i'm doing wrong here with the syntax? thanks in advance
--
http://mail.python.org/mailman/listinfo/python-list
[Tim Peters]
>> What is "XWwz"? Assuming it's a bizarre typo for "open", change the
>> 'w' there to 'wb'. Pickles are binary data, and files holding pickles
>> must be opened in binary mode, especially since:
>>
>>> ...
>>> (on WinXP, CPython 2.4.1)
[Rune Strand]
> Thanks Tim. The bizarre 'typo
[Tim Peters]
> What is "XWwz"? Assuming it's a bizarre typo for "open", change the
> 'w' there to 'wb'. Pickles are binary data, and files holding pickles
> must be opened in binary mode, especially since:
>
> > ...
> > (on WinXP, CPython 2.4.1)
Thanks Tim. The bizarre 'typo' appears to be cause
[Rune Strand]
> I'm experiencing strange errors both with pickle and cPickle in the
> below code:
>
>
> import cPickle as pickle
> #import pickle
> from string import ascii_uppercase
> from string import ascii_lowercase
>
> def createData():
>d1 = list("Something's rotten")
>d2 = tuple('in
def doUnpicle(pickleFile = 'pickleTest.p'):
f = XWwz(pickleFile, 'rb')
up = pickle.Unpickler(f)
data = up.load()
f.close()
return data
data = createData()
doPickle(data)
xdata = doUnpicle()
1) The above code works, but if I use pickle instead of cPickle, I
: KeyError
[EMAIL PROTECTED] wrote:
> Hi "R",
>
> The only explanation I can give is that the environment varialbe
REMOTE_ADDR
> does not exist! Wrap your high-level code with try and except. Example:
> try:
> tablesDirectory = tablesDirectoryPrefix + os.environ[
[EMAIL PROTECTED] wrote:
Hi "R",
The only explanation I can give is that the environment varialbe REMOTE_ADDR
does not exist! Wrap your high-level code with try and except. Example:
try:
tablesDirectory = tablesDirectoryPrefix + os.environ['REMOTE_ADDR']
except KeyError:
#
[EMAIL PROTECTED] wrote:
> Hello.
> Maybe someone will help me with this KeyError:
>
>
> Traceback (most recent call last):
> File "C:\Python\tabla.py", line 929, in -toplevel-
> tablesDirectory = tablesDirectoryPrefix + os.env
Hi "R",
The only explanation I can give is that the environment varialbe REMOTE_ADDR
does not exist! Wrap your high-level code with try and except. Example:
try:
tablesDirectory = tablesDirectoryPrefix + os.environ['REMOTE_ADDR']
except KeyError:
# Code to handle the fact
On Wednesday 15 December 2004 13:33, [EMAIL PROTECTED] wrote:
> Hello.
> Maybe someone will help me with this KeyError:
>
>
> Traceback (most recent call last):
> File "C:\Python\tabla.py", line 929, in -toplevel-
> tablesDi
Hello.
Maybe someone will help me with this KeyError:
Traceback (most recent call last):
File "C:\Python\tabla.py", line 929, in -toplevel-
tablesDirectory = tablesDirectoryPrefix + os.environ['REMOTE_ADDR']
File "C:\Python23\lib\os.py&q
72 matches
Mail list logo