"M.N.A.Smadi" <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list