faqts : Computers : Programming : Languages : Python : Modules : numpy

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

4 of 5 people (80%) answered Yes
Recently 2 of 2 people (100%) answered Yes

Entry

I'm getting an error stating that "None" object has no attribute "groups" during setup of numpy, any ideas?

Oct 30th, 2000 02:30
mm mm, Michael Risser, Oleg Broytmann


It seems you are trying to do the following - match or search for
regular expression:
match_object = re.search(pattern, string)
groups = match_object.groups()
   But your regexp didn't match anything in the string, so match_object
here is really None. Test it before doing anything with it:
match_object = re.search(pattern, string)
if match_object:
   groups = match_object.groups()
else:
   print "No match!"