Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #111988
| From | Enjoys Math <enjoysmath@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | `exec`-based routine crashes app upon migration from 3.4.3 to python 3.5.2. |
| Date | 2016-07-28 08:47 -0700 |
| Message-ID | <mailman.4.1469730339.6033.python-list@python.org> (permalink) |
| References | <CAPKUSf6241yGYgVag-+P_Tob_Jq_UMWCbS6TGafYk2OVXvdOSw@mail.gmail.com> |
I've manually set breakpoints and traced this app crash back to this
function:
def loadLSobjsOfType(self, objType, listJ):
if listJ != None:
for objJ in listJ:
_locals = locals()
exec('obj = ' + objType + '(self)', None, _locals)
obj = _locals['obj']
obj.loadJson(objJ)
self.addLSobjOfType(objType, obj)
when breakpoints are set on `obj=_locals['obj']` my wingware debugger kicks
in and throws a KeyError exeption.
So what's the proper way to get the return value of an exec call when there
is one?
Thanks.
Regards,
EM
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
`exec`-based routine crashes app upon migration from 3.4.3 to python 3.5.2. Enjoys Math <enjoysmath@gmail.com> - 2016-07-28 08:47 -0700
Re: `exec`-based routine crashes app upon migration from 3.4.3 to python 3.5.2. Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-08-01 18:45 -0700
Re: `exec`-based routine crashes app upon migration from 3.4.3 to python 3.5.2. eryk sun <eryksun@gmail.com> - 2016-08-02 04:48 +0000
csiph-web