dedupeio / dedupe-examples

:id: Examples for using the dedupe library
MIT License
406 stars 214 forks source link

response.read? Loading Illinois data for psql big dedupe example. #50

Closed rjbergerud closed 7 years ago

rjbergerud commented 7 years ago

When I run python pgsql_big_dedupe_example_init_db.py, I get the error

Traceback (most recent call last):
  File "pgsql_big_dedupe_example_init_db.py", line 38, in <module>
    localFile.write(u.read())
AttributeError: 'Response' object has no attribute 'read'

I've tried with both python 2 and 3. Looking at the api for requests, I can't see an attribute called read on the response object either.

http://docs.python-requests.org/en/master/api/

stucka commented 7 years ago

That's not right. I haven' t tried it, but I suspect you're looking for localFile.write(u.content)

rjbergerud commented 7 years ago

Its line 38 of dedupe-examples/pgsql_big_dedupe_example/pgsql_big_dedupe_example_init_db.py

fgregg commented 7 years ago

Do you want to make a PR?

On Wed, Apr 19, 2017 at 11:58 AM, Ryder notifications@github.com wrote:

Its line 38 of dedupe-examples/pgsql_big_dedupe_example/pgsqlbig dedupe_example_init_db.py

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dedupeio/dedupe-examples/issues/50#issuecomment-295344906, or mute the thread https://github.com/notifications/unsubscribe-auth/AAgxbRjGn-pr-IMWrhvgTxO63Yu-DWjHks5rxj1SgaJpZM4NB7KJ .

-- 773.888.2718

rjbergerud commented 7 years ago

@fgregg yep

rjbergerud commented 7 years ago

51