<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: &#8220;AttributeError: &#8216;module&#8217; object has no attribute &#8216;blah&#8217;&#8221;</title>
	<atom:link href="http://www.willmer.com/kb/2007/12/attributeerror-module-object-has-no-attribute-blah/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.willmer.com/kb/2007/12/attributeerror-module-object-has-no-attribute-blah/</link>
	<description></description>
	<lastBuildDate>Sun, 15 Aug 2010 05:18:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Dan</title>
		<link>http://www.willmer.com/kb/2007/12/attributeerror-module-object-has-no-attribute-blah/comment-page-1/#comment-46518</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Sat, 14 Aug 2010 17:46:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.willmer.com/kb/2007/12/attributeerror-module-object-has-no-attribute-blah/#comment-46518</guid>
		<description>Anyone here know how I can pass a regexp this module?:

import re

def htc(m):
        return chr(int(m.group(1),16))

def urldecode(url):
        rex=re.compile(&#039;%([0-9a-hA-H][0-9a-hA-H])&#039;,re.M)
        return rex.sub(htc,url)

if __name__ == &#039;__main__&#039;:
        print urldecode(&#039;adasasdasd%20asdasdasdas&#039;)

Using re.urldecode gives me the same &quot;‘module’ object has no attribute&quot; error but I&#039;m new at this and don&#039;t really know what I&#039;m doing. The module seem to work fine I just can&#039;t figure out how to pass a regexp to urldecode. Example:

match=re.compile(&#039;flv_url=(.+?)amp;url_bigthumb&#039;).findall(link)
urls=re.urldecode(&#039;match&#039;)

or

match=re.compile(&#039;flv_url=(.+?)amp;url_bigthumb&#039;).findall(link)
print urldecode(&#039;match&#039;)

Thanks for any help.</description>
		<content:encoded><![CDATA[<p>Anyone here know how I can pass a regexp this module?:</p>
<p>import re</p>
<p>def htc(m):<br />
        return chr(int(m.group(1),16))</p>
<p>def urldecode(url):<br />
        rex=re.compile(&#8216;%([0-9a-hA-H][0-9a-hA-H])&#8217;,re.M)<br />
        return rex.sub(htc,url)</p>
<p>if __name__ == &#8216;__main__&#8217;:<br />
        print urldecode(&#8216;adasasdasd%20asdasdasdas&#8217;)</p>
<p>Using re.urldecode gives me the same &#8220;‘module’ object has no attribute&#8221; error but I&#8217;m new at this and don&#8217;t really know what I&#8217;m doing. The module seem to work fine I just can&#8217;t figure out how to pass a regexp to urldecode. Example:</p>
<p>match=re.compile(&#8216;flv_url=(.+?)amp;url_bigthumb&#8217;).findall(link)<br />
urls=re.urldecode(&#8216;match&#8217;)</p>
<p>or</p>
<p>match=re.compile(&#8216;flv_url=(.+?)amp;url_bigthumb&#8217;).findall(link)<br />
print urldecode(&#8216;match&#8217;)</p>
<p>Thanks for any help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pete</title>
		<link>http://www.willmer.com/kb/2007/12/attributeerror-module-object-has-no-attribute-blah/comment-page-1/#comment-45001</link>
		<dc:creator>Pete</dc:creator>
		<pubDate>Fri, 15 Jan 2010 15:30:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.willmer.com/kb/2007/12/attributeerror-module-object-has-no-attribute-blah/#comment-45001</guid>
		<description>thanks.  my problem was that i had two versions of a python package (numpy).  i was trying to invoke a method that was only in the new one, however it found the old package first, so it couldn&#039;t locate the new method.

anyway, your post got me looking in the right direction :)</description>
		<content:encoded><![CDATA[<p>thanks.  my problem was that i had two versions of a python package (numpy).  i was trying to invoke a method that was only in the new one, however it found the old package first, so it couldn&#8217;t locate the new method.</p>
<p>anyway, your post got me looking in the right direction <img src='http://www.willmer.com/kb/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aksegaly</title>
		<link>http://www.willmer.com/kb/2007/12/attributeerror-module-object-has-no-attribute-blah/comment-page-1/#comment-43510</link>
		<dc:creator>aksegaly</dc:creator>
		<pubDate>Sat, 24 Oct 2009 21:24:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.willmer.com/kb/2007/12/attributeerror-module-object-has-no-attribute-blah/#comment-43510</guid>
		<description>this is my error
attributeerror â€˜moduleâ€™ object has no attribute system
affer the compilation
help meâ€¦</description>
		<content:encoded><![CDATA[<p>this is my error<br />
attributeerror â€˜moduleâ€™ object has no attribute system<br />
affer the compilation<br />
help meâ€¦</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aksegaly</title>
		<link>http://www.willmer.com/kb/2007/12/attributeerror-module-object-has-no-attribute-blah/comment-page-1/#comment-43509</link>
		<dc:creator>aksegaly</dc:creator>
		<pubDate>Sat, 24 Oct 2009 21:23:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.willmer.com/kb/2007/12/attributeerror-module-object-has-no-attribute-blah/#comment-43509</guid>
		<description>this is my error
attributeerror â€˜moduleâ€™ object has no attribute system
helpâ€¦</description>
		<content:encoded><![CDATA[<p>this is my error<br />
attributeerror â€˜moduleâ€™ object has no attribute system<br />
helpâ€¦</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aksegaly</title>
		<link>http://www.willmer.com/kb/2007/12/attributeerror-module-object-has-no-attribute-blah/comment-page-1/#comment-43508</link>
		<dc:creator>aksegaly</dc:creator>
		<pubDate>Sat, 24 Oct 2009 21:21:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.willmer.com/kb/2007/12/attributeerror-module-object-has-no-attribute-blah/#comment-43508</guid>
		<description>this is my error 
attributeerror &#039;module&#039; object has no attribute system
help...</description>
		<content:encoded><![CDATA[<p>this is my error<br />
attributeerror &#8216;module&#8217; object has no attribute system<br />
help&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gnarlodious</title>
		<link>http://www.willmer.com/kb/2007/12/attributeerror-module-object-has-no-attribute-blah/comment-page-1/#comment-42255</link>
		<dc:creator>Gnarlodious</dc:creator>
		<pubDate>Sat, 05 Sep 2009 03:29:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.willmer.com/kb/2007/12/attributeerror-module-object-has-no-attribute-blah/#comment-42255</guid>
		<description>Thanks for the hint. In my case the script was named &quot;Cookie&quot;, the same as the module imported. One symptom was that I was getting double printing in both Terminal and browser.</description>
		<content:encoded><![CDATA[<p>Thanks for the hint. In my case the script was named &#8220;Cookie&#8221;, the same as the module imported. One symptom was that I was getting double printing in both Terminal and browser.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: snf</title>
		<link>http://www.willmer.com/kb/2007/12/attributeerror-module-object-has-no-attribute-blah/comment-page-1/#comment-41471</link>
		<dc:creator>snf</dc:creator>
		<pubDate>Sun, 09 Aug 2009 21:55:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.willmer.com/kb/2007/12/attributeerror-module-object-has-no-attribute-blah/#comment-41471</guid>
		<description>just a brief note

if you use import to include a module, make sure you don&#039;t have a file named just the same as the module you are trying to include in current directory

it seems that python takes preference for local files over modules thus import fails

a rookie observation

cheers</description>
		<content:encoded><![CDATA[<p>just a brief note</p>
<p>if you use import to include a module, make sure you don&#8217;t have a file named just the same as the module you are trying to include in current directory</p>
<p>it seems that python takes preference for local files over modules thus import fails</p>
<p>a rookie observation</p>
<p>cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.willmer.com/kb/2007/12/attributeerror-module-object-has-no-attribute-blah/comment-page-1/#comment-39621</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Mon, 22 Jun 2009 04:33:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.willmer.com/kb/2007/12/attributeerror-module-object-has-no-attribute-blah/#comment-39621</guid>
		<description>Thanks so much!  __init__.py was my problem :)</description>
		<content:encoded><![CDATA[<p>Thanks so much!  __init__.py was my problem <img src='http://www.willmer.com/kb/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: muslu</title>
		<link>http://www.willmer.com/kb/2007/12/attributeerror-module-object-has-no-attribute-blah/comment-page-1/#comment-37264</link>
		<dc:creator>muslu</dc:creator>
		<pubDate>Wed, 29 Apr 2009 10:53:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.willmer.com/kb/2007/12/attributeerror-module-object-has-no-attribute-blah/#comment-37264</guid>
		<description>i added settings.py and i include __init__.py in the folder but still have problem</description>
		<content:encoded><![CDATA[<p>i added settings.py and i include __init__.py in the folder but still have problem</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lacking imsave()</title>
		<link>http://www.willmer.com/kb/2007/12/attributeerror-module-object-has-no-attribute-blah/comment-page-1/#comment-36057</link>
		<dc:creator>lacking imsave()</dc:creator>
		<pubDate>Mon, 06 Apr 2009 22:58:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.willmer.com/kb/2007/12/attributeerror-module-object-has-no-attribute-blah/#comment-36057</guid>
		<description>I&#039;m new to the whole python world, but im having this same type of problem:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)

/Users/lzkelley/Programs/Biophysics/Templates/nc_make_ffts.py in ()
     55              fft_image /= m
     56 
---&gt; 57              misc.imsave(&quot;fft&quot;+str(num_images)+&quot;.png&quot;,fft_image)
     58 
     59 

AttributeError: &#039;module&#039; object has no attribute &#039;imsave&#039;
WARNING: Failure executing file: 
--------------------------------------------------------------

and when i try to import the method explicitly

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)

/Users/lzkelley/Programs/Biophysics/Templates/nc_make_ffts.py in ()
      3 import pylab
      4 from scipy import *
----&gt; 5 from scipy.misc import imsave
      6 from pylab import *
      7 import os

ImportError: cannot import name imsave
WARNING: Failure executing file: 
Python 2.5.4 (r254:67916, Apr  6 2009, 15:48:49)
-------------------------------------------------
any thoughts?</description>
		<content:encoded><![CDATA[<p>I&#8217;m new to the whole python world, but im having this same type of problem:</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
AttributeError                            Traceback (most recent call last)</p>
<p>/Users/lzkelley/Programs/Biophysics/Templates/nc_make_ffts.py in ()<br />
     55              fft_image /= m<br />
     56<br />
&#8212;&gt; 57              misc.imsave(&#8220;fft&#8221;+str(num_images)+&#8221;.png&#8221;,fft_image)<br />
     58<br />
     59 </p>
<p>AttributeError: &#8216;module&#8217; object has no attribute &#8216;imsave&#8217;<br />
WARNING: Failure executing file:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>and when i try to import the method explicitly</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
ImportError                               Traceback (most recent call last)</p>
<p>/Users/lzkelley/Programs/Biophysics/Templates/nc_make_ffts.py in ()<br />
      3 import pylab<br />
      4 from scipy import *<br />
&#8212;-&gt; 5 from scipy.misc import imsave<br />
      6 from pylab import *<br />
      7 import os</p>
<p>ImportError: cannot import name imsave<br />
WARNING: Failure executing file:<br />
Python 2.5.4 (r254:67916, Apr  6 2009, 15:48:49)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
any thoughts?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
