Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Python Problems
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="dr_springfield" data-source="post: 31437"><p>I'm very new to python... ran into this error</p><p></p><p>code:</p><p></p><p>import urllib</p><p>proxies = proxies={'http': 'http://61.131.59.66:8080'}</p><p>filehandle = urllib.urlopen('http://whatismyip.com', proxies=proxies)</p><p></p><p>error:</p><p></p><p>AttributeError: 'NoneType' object has no attribute 'read'</p><p></p><p>The problem is in the proxies variable... running without it (proxies=None) generates no error. Anyone know python? </p><p>p.s. I took this code straight off the python website describing the urllib module... so it *should* work...</p></blockquote><p></p>
[QUOTE="dr_springfield, post: 31437"] I'm very new to python... ran into this error code: import urllib proxies = proxies={'http': 'http://61.131.59.66:8080'} filehandle = urllib.urlopen('http://whatismyip.com', proxies=proxies) error: AttributeError: 'NoneType' object has no attribute 'read' The problem is in the proxies variable... running without it (proxies=None) generates no error. Anyone know python? p.s. I took this code straight off the python website describing the urllib module... so it *should* work... [/QUOTE]
Verification
Name this item 🌈
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Python Problems
Top