attribute error
Mike Meyer
mwm at mired.org
Mon Sep 26 19:13:13 EDT 2005
"M.N.A.Smadi" <smadim2 at grads.ece.mcmaster.ca> writes:
> HI;
>
> I am having the following error. I am using someone else's code and
> all they are doing is pass an argv to a function then
>
> def execute_action(manager, argv):
> method_name = argv.pop(0).lower()
>
>
> and am getting this strange error.
> AttributeError: 'str' object has no attribute 'pop'
>
> am using Python 2.3.4 and am importing the following libraries:
>
> import sys, os, inspect
> from Asterisk import Manager, BaseException, Config
> import Asterisk.Util
>
> but i always thought that something like this will be standard stuff.
> Any ideas?
Yes - show us the rest of the code. execute_action is never called in
the snippets you posted, and it's pretty clear that it's being invoked
with the wrong thing as an argument. Can you provide a minimal working
(well, executable) code sample that generates the error message you
are getting?
Oh yeah - post the full traceback as well.
<mike
--
Mike Meyer <mwm at mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
More information about the Python-list
mailing list