Questions tagged [httplib2]

A comprehensive HTTP client library

A comprehensive HTTP client library, httplib2 supports many features left out of other HTTP libraries.

217 questions
5
votes
3 answers

Python List to String Conversion

This seems like a simple task and I'm not sure if I've accomplished it already, or if I'm chasing my tail. values = [value.replace('-','') for value in values] ## strips out hyphen (only 1) print values ## outputs ['0160840020'] …
smada
  • 227
  • 1
  • 7
  • 17
4
votes
1 answer

Python httplib2 AttributeError: 'builtin_function_or_method' object has no attribute 'new'

I am trying to scrape text from wikipedia. Since httplib2 is already installed, I thought I would use it. When I go through the simple retrieval from their basic examples, the first example gives me this error. > import httplib2 > h =…
gabe
  • 2,521
  • 2
  • 25
  • 37
4
votes
1 answer

Google API client (Python): is it possible to use BatchHttpRequest with ETag caching

I'm using YouTube data API v3. Is it possible to make a big BatchHttpRequest (e.g., see here) and also to use ETags for local caching at the httplib2 level (e.g., see here)? ETags work fine for single queries, I don't understand if they are useful…
floatingpurr
  • 7,749
  • 9
  • 46
  • 106
4
votes
2 answers

Using httplib2 in python 3 properly? (Timeout problems)

Hey, first time post, I'm really stuck on httplib2. I've been reading up on it from diveintopython3.org, but it mentions nothing about a timeout function. I look up the documentation, but the only thing I see is an ability to put a timeout int but…
VolatileRig
  • 2,727
  • 6
  • 32
  • 44
4
votes
2 answers

SSL version in httplib2 - EOF occurred in violation of protocol

I'm issuing a HTTPS GET request to a REST service I own with httplib2 but we're getting the error: [Errno 8] _ssl.c:504: EOF occurred in violation of protocol All other clients works well (browser, Java client, etc...) with the minor exception…
Felipe Hummel
  • 4,674
  • 5
  • 32
  • 35
4
votes
1 answer

ImportError: No module named httplib2 App engine 1.8.0

I get the error ImportError: No module named httplib2 when I import httplib2. I have the latest version of App Engine launcher (1.8.0.802) and I'm able see the lib folder with all files under…
user1791567
  • 1,388
  • 1
  • 16
  • 29
4
votes
1 answer

Character encoding error: UnicodeEncodeError: 'charmap' codec can't encode character X in position Y: character maps to

I'm trying to scrape yahoo finance web pages to get stock price data with Python 3.3, httplib2, and beautifulsoup4. Here is the code: def getData (symbol = 'GOOG', period = 'm'): baseUrl = 'http://finance.yahoo.com/q/hp?s=' url = baseUrl…
tldr
  • 11,924
  • 15
  • 75
  • 120
4
votes
0 answers

Httplib2 module installation on window7 64

In Python, I used the easy_install and tried to install oauth2. Then I found it needs httplib2. Used: easy_install httplib2 in the command prompt. and found the httplib2 0.7.6 egg in site-packages directory. But when I do import httplib2 it came…
3
votes
1 answer

Python 3 httplib2 cookies

Fixed, httplin2 can't handle more than one cookie, the patch can be found here: http://code.google.com/p/httplib2/issues/detail?id=146 I am coding a facebook login script to get my last notifications but I'm having a problem. I've changed from…
Lautaro
  • 362
  • 3
  • 14
3
votes
2 answers

Permission Denied on httplib2 install

I'm trying to install the httplib2 library for Python so I can use it to interact with the Twitter but I get the following error in the console when I try to install via 'python setup.py install'. This is a new MBA and I am the only user (and…
Chris
  • 11,819
  • 19
  • 91
  • 145
3
votes
1 answer

httplib binary data and UnicodeDecodeError in python 2.7

I just discovered that starting with Python 2.7, the httplib doesn't work anymore with binary data, breaking modules that where sending binary data over HTTP, one example being PyAMF Python bug: http://bugs.python.org/issue11898 PyAMF bug:…
sorin
  • 161,544
  • 178
  • 535
  • 806
3
votes
0 answers

httplib2 invalid syntax error when attempting to import

I am attempting to set up an apache-beam pipeline and I keep getting the following error when I run my code Traceback (most recent call last): File "C:/Users/Student/PycharmProjects/Event-Log/Event-Pipeline.py", line 5, in import…
Rice Tyler
  • 121
  • 1
  • 7
3
votes
0 answers

Python 2.7.11 httplib2 throws CERTIFICATE_VERIFY_FAILED for the wrong certificate for SSL SNI website

I have a website that's accessible through multiple URL's, 2 of which have SSL certificates, which are served using SSL SNI (the entire thing is served using nginx). This setup worked fine for browsers as well as Python 2.7.11 code that monitors the…
Itamar
  • 1,089
  • 1
  • 10
  • 18
3
votes
1 answer

Python module httplib2 and python path

I am trying to use httplib2 in Python 2.7 on Windows 7 using the IDLE PythonWin 32 build 219. I downloaded it and installed using python setup.py install method. On Windows command line the following is successful: python import…
Evan
  • 1,960
  • 4
  • 26
  • 54
3
votes
1 answer

Pull timeout with google-api-python-client

I am trying to set a user defined timeout on message pull with 'returnImmediately' = False : PUBSUB_SCOPES = ['https://www.googleapis.com/auth/pubsub'] credentials = oauth2client.GoogleCredentials.get_application_default() if…
yuval
  • 1,680
  • 2
  • 12
  • 8
1 2
3
14 15