Bitcoin Forum
May 25, 2017, 10:26:50 PM *
News: If the forum does not load normally for you, please send me a traceroute.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: need help with python  (Read 1041 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
Each block is stacked on top of the previous one. Adding another block to the top makes all lower blocks more difficult to remove: there is more "weight" above each block. A transaction in a block 6 blocks deep (6 confirmations) will be very difficult to remove.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1495751210
Hero Member
*
Offline Offline

Posts: 1495751210

View Profile Personal Message (Offline)

Ignore
1495751210
Reply with quote  #2

1495751210
Report to moderator
1495751210
Hero Member
*
Offline Offline

Posts: 1495751210

View Profile Personal Message (Offline)

Ignore
1495751210
Reply with quote  #2

1495751210
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: 2016


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!