Bitcoin Forum
December 05, 2016, 04:57:05 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: need help with python  (Read 989 times)
cytokine
Donator
Full Member
*
Offline Offline

Activity: 224



View Profile
May 15, 2012, 09:29:17 PM
 #1

What am I doing wrong?
 
    import json, urllib.request, os
    url = 'https://www.glbse.com/api/market/assets'
    if not os.path.exists( 'local' ): os.mkdir( 'local' )
    filename = 'local/assets.glb'
    print( 'Debug> updating %s' % filename )
    response = urllib.request.urlopen( url )
    --> crash

  File "C:\Python32\lib\ssl.py", line 268, in __init__
    raise x
  File "C:\Python32\lib\ssl.py", line 264, in __init__
    self.do_handshake()
  File "C:\Python32\lib\ssl.py", line 443, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [Errno 1] _ssl.c:392: error:1411809D:SSL routines:SSL_CHECK_SERVER
HELLO_TLSEXT:tls invalid ecpointformat list
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1480957025
Hero Member
*
Offline Offline

Posts: 1480957025

View Profile Personal Message (Offline)

Ignore
1480957025
Reply with quote  #2

1480957025
Report to moderator
1480957025
Hero Member
*
Offline Offline

Posts: 1480957025

View Profile Personal Message (Offline)

Ignore
1480957025
Reply with quote  #2

1480957025
Report to moderator
1480957025
Hero Member
*
Offline Offline

Posts: 1480957025

View Profile Personal Message (Offline)

Ignore
1480957025
Reply with quote  #2

1480957025
Report to moderator
Nefario
Hero Member
*****
Offline Offline

Activity: 602


GLBSE Support support@glbse.com


View Profile WWW
May 15, 2012, 10:02:40 PM
 #2

You need to update your openssl library

http://rt.openssl.org/Ticket/Display.html?id=2240&user=guest&pass=guest

Or you could set it so that the certificates authenticity is not checked (this does leave you open to a MITM attack, no biggie if this is just a play script though).

PGP key id at pgp.mit.edu 0xA68F4B7C

To get help and support for GLBSE please email support@glbse.com
Sukrim
Legendary
*
Offline Offline

Activity: 1848


View Profile
May 15, 2012, 10:05:40 PM
 #3

Maybe your python has no SSL support?

I got 0 errors with that code...

https://bitfinex.com <-- leveraged trading of BTCUSD, LTCUSD and LTCBTC (long and short) - 10% discount on fees for the first 30 days with this refcode: x5K9YtL3Zb
Mail me at Bitmessage: BM-BbiHiVv5qh858ULsyRDtpRrG9WjXN3xf
cytokine
Donator
Full Member
*
Offline Offline

Activity: 224



View Profile
May 15, 2012, 11:00:54 PM
 #4

Maybe your python has no SSL support?

I got 0 errors with that code...

I'm using python 3.2.3, that could be the problem

I think python 2.x urllib does not verify certs by default on SSL
cytokine
Donator
Full Member
*
Offline Offline

Activity: 224



View Profile
May 15, 2012, 11:45:14 PM
 #5

Or you could set it so that the certificates authenticity is not checked (this does leave you open to a MITM attack, no biggie if this is just a play script though).

Makes sense, just need to figure out how to do that ( cannot seem to find this documented )

Thanks for the help!
cytokine
Donator
Full Member
*
Offline Offline

Activity: 224



View Profile
May 25, 2012, 08:17:42 PM
 #6

So I ended up downgrading to Python 2.x, and bam everything just works.

Thanks
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!