ozgur / python-linkedin

Python interface to the LinkedIn API
http://ozgur.github.com/python-linkedin/
MIT License
894 stars 392 forks source link

HTTP API localhost error #97

Open sahinanarat opened 8 years ago

sahinanarat commented 8 years ago

When I run http_api and open localhost:8080 on browser as

Set LINKEDIN_API_KEY and LINKEDIN_API_SECRET, configure your app to redirect to http://localhost:8080/code, then execute:

http_api.py Visit http://localhost:8080 in your browser, curl or similar A tab in your browser will open up, give LinkedIn permission there You'll then be presented with a list of available routes, hit any, e.g.: curl -XGET http://localhost:8080/get_profile

guides, it gives

C:\Python27\python.exe C:/Users/SahinPC/PycharmProjects/untitled/http_api.py
Server started on port:8080
127.0.0.1 - - [18/Mar/2016 16:42:19] "GET / HTTP/1.1" 200 -
Traceback (most recent call last):
  File "C:\Python27\lib\SocketServer.py", line 599, in process_request_thread
    self.finish_request(request, client_address)
  File "C:\Python27\lib\SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "C:\Python27\lib\SocketServer.py", line 655, in __init__
    self.handle()
  File "C:\Python27\lib\BaseHTTPServer.py", line 340, in handle
    self.handle_one_request()
  File "C:\Python27\lib\BaseHTTPServer.py", line 328, in handle_one_request
    method()
  File "C:/Users/Tiar/PycharmProjects/untitled/http_api.py", line 160, in do_GET
----------------------------------------
    open_new_tab(liw.authentication.authorization_url)
Exception happened during processing of request from ('127.0.0.1', 51846)
----------------------------------------
  File "C:\Python27\lib\site-packages\linkedin\linkedin.py", line 98, in authorization_url
    qsl = ['%s=%s' % (urllib.quote(k), urllib.quote(v)) for k, v in qd.items()]
  File "C:\Python27\lib\urllib.py", line 1290, in quote
    raise TypeError('None object cannot be quoted')
TypeError: None object cannot be quoted
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 51848)
----------------------------------------
127.0.0.1 - - [18/Mar/2016 16:42:19] "GET /favicon.ico HTTP/1.1" 200 -
Traceback (most recent call last):
  File "C:\Python27\lib\SocketServer.py", line 599, in process_request_thread
    self.finish_request(request, client_address)
  File "C:\Python27\lib\SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "C:\Python27\lib\SocketServer.py", line 655, in __init__
    self.handle()
  File "C:\Python27\lib\BaseHTTPServer.py", line 340, in handle
    self.handle_one_request()
  File "C:\Python27\lib\BaseHTTPServer.py", line 328, in handle_one_request
    method()
  File "C:/Users/Tiar/PycharmProjects/untitled/http_api.py", line 160, in do_GET
    open_new_tab(liw.authentication.authorization_url)
  File "C:\Python27\lib\site-packages\linkedin\linkedin.py", line 98, in authorization_url
    qsl = ['%s=%s' % (urllib.quote(k), urllib.quote(v)) for k, v in qd.items()]
  File "C:\Python27\lib\urllib.py", line 1290, in quote
    raise TypeError('None object cannot be quoted')
TypeError: None object cannot be quoted

How could we solve this? Any opinion is appreciated.

doqac commented 8 years ago

I have the same problem, seems like linkedin framework needs to get checked again.

hoenie-ams commented 7 years ago

same problem here too... how can we solve it?