Bitcoin Forum
May 13, 2024, 03:00:31 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: need help with python  (Read 1151 times)
cytokine (OP)
Donator
Full Member
*
Offline Offline

Activity: 224
Merit: 100



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
1715569231
Hero Member
*
Offline Offline

Posts: 1715569231

View Profile Personal Message (Offline)

Ignore
1715569231
Reply with quote  #2

1715569231
Report to moderator
1715569231
Hero Member
*
Offline Offline

Posts: 1715569231

View Profile Personal Message (Offline)

Ignore
1715569231
Reply with quote  #2

1715569231
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715569231
Hero Member
*
Offline Offline

Posts: 1715569231

View Profile Personal Message (Offline)

Ignore
1715569231
Reply with quote  #2

1715569231
Report to moderator
1715569231
Hero Member
*
Offline Offline

Posts: 1715569231

View Profile Personal Message (Offline)

Ignore
1715569231
Reply with quote  #2

1715569231
Report to moderator
1715569231
Hero Member
*
Offline Offline

Posts: 1715569231

View Profile Personal Message (Offline)

Ignore
1715569231
Reply with quote  #2

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

Activity: 602
Merit: 512


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: 2618
Merit: 1006


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://www.coinlend.org <-- automated lending at various exchanges.
https://www.bitfinex.com <-- Trade BTC for other currencies and vice versa.
cytokine (OP)
Donator
Full Member
*
Offline Offline

Activity: 224
Merit: 100



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 (OP)
Donator
Full Member
*
Offline Offline

Activity: 224
Merit: 100



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 (OP)
Donator
Full Member
*
Offline Offline

Activity: 224
Merit: 100



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:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!