question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SSL: CERTIFICATE_VERIFY_FAILED

See original GitHub issue

Hello,

I must be overlooking something obvious !

I used notepad++ to edit default.cfg

I copy pasted apikey and secret from Poloniex, I get the following messages:

Thanks

cmd output —

Obtaining settings from config file.
Welcome to Poloniex Lending Bot
2016-08-01 17:04:14 ERROR: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>
Traceback (most recent call last):
  File "R:\poloniexlendingbot-master\lendingbot.py", line 460, in <module>
    refreshTotalLended()
  File "R:\poloniexlendingbot-master\lendingbot.py", line 223, in refreshTotalLended
    cryptoLended = bot.returnActiveLoans()
  File "R:\poloniexlendingbot-master\poloniex.py", line 101, in returnActiveLoans
    return self.api_query('returnActiveLoans')
  File "R:\poloniexlendingbot-master\poloniex.py", line 58, in api_query
    ret = urllib2.urlopen(urllib2.Request('https://poloniex.com/tradingApi', post_data, headers))
  File "C:\Program\Python27\lib\urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "C:\Program\Python27\lib\urllib2.py", line 431, in open
    response = self._open(req, data)
  File "C:\Program\Python27\lib\urllib2.py", line 449, in _open
    '_open', req)
  File "C:\Program\Python27\lib\urllib2.py", line 409, in _call_chain
    result = func(_args)
  File "C:\Program\Python27\lib\urllib2.py", line 1240, in https_open
    context=self._context)
  File "C:\Program\Python27\lib\urllib2.py", line 1197, in do_open
    raise URLError(err)
URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>
2016-08-01 17:05:14 ERROR: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>
Traceback (most recent call last):
  File "R:\poloniexlendingbot-master\lendingbot.py", line 460, in <module>
    refreshTotalLended()
  File "R:\poloniexlendingbot-master\lendingbot.py", line 223, in refreshTotalLended
    cryptoLended = bot.returnActiveLoans()
  File "R:\poloniexlendingbot-master\poloniex.py", line 101, in returnActiveLoans
    return self.api_query('returnActiveLoans')
  File "R:\poloniexlendingbot-master\poloniex.py", line 58, in api_query
    ret = urllib2.urlopen(urllib2.Request('https://poloniex.com/tradingApi', post_data, headers))
  File "C:\Program\Python27\lib\urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "C:\Program\Python27\lib\urllib2.py", line 431, in open
    response = self._open(req, data)
  File "C:\Program\Python27\lib\urllib2.py", line 449, in _open
    '_open', req)
  File "C:\Program\Python27\lib\urllib2.py", line 409, in _call_chain
    result = func(_args)
  File "C:\Program\Python27\lib\urllib2.py", line 1240, in https_open
    context=self._context)
  File "C:\Program\Python27\lib\urllib2.py", line 1197, in do_open
    raise URLError(err)
URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>
2016-08-01 17:06:14 ERROR: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>
Traceback (most recent call last):
  File "R:\poloniexlendingbot-master\lendingbot.py", line 460, in <module>
    refreshTotalLended()
  File "R:\poloniexlendingbot-master\lendingbot.py", line 223, in refreshTotalLended
    cryptoLended = bot.returnActiveLoans()
  File "R:\poloniexlendingbot-master\poloniex.py", line 101, in returnActiveLoans
    return self.api_query('returnActiveLoans')
  File "R:\poloniexlendingbot-master\poloniex.py", line 58, in api_query
    ret = urllib2.urlopen(urllib2.Request('https://poloniex.com/tradingApi', post_data, headers))
  File "C:\Program\Python27\lib\urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "C:\Program\Python27\lib\urllib2.py", line 431, in open
    response = self._open(req, data)
  File "C:\Program\Python27\lib\urllib2.py", line 449, in _open
    '_open', req)
  File "C:\Program\Python27\lib\urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "C:\Program\Python27\lib\urllib2.py", line 1240, in https_open
    context=self._context)
  File "C:\Program\Python27\lib\urllib2.py", line 1197, in do_open
    raise URLError(err)
URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>
2016-08-01 17:07:04 bye

[API]
apikey = myapikey
secret = thesecret

[BOT]
# sleep between active iterations, time in seconds (1-3600)

sleeptimeactive = 60
# sleep between inactive iterations, time in seconds (1-3600)
# set to same as sleeptimeactive to disable

sleeptimeinactive = 300
# minimum daily lend rate in percent (0.00003-0.05)

mindailyrate = 0.04
# max rate. 2% is good choice because it's default at margin trader interface.
#5% is max to be accepted by the exchange (0.00003-0.05)

maxdailyrate = 2
# The number of offers to split the available balance across the [gaptop, gapbottom] range. (1-20)

spreadlend = 3
# The depth of lendbook (in percent of lendable balance) to move through
# before placing the first (gapbottom) and last (gaptop) offer.
# If gapbottom is set to 0, the first offer will be at the lowest possible rate.
# However some low value is recommended (say 10%) to skip dust offers.

gapbottom = 10
gaptop = 200
# Daily lend rate threshold after which we offer lends for 60 days as opposed to 2.
# If set to 0 all offers will be placed for a 2 day period (0.00003-0.05)

sixtydaythreshold = 0.2
# Minimum loan size the minimum size of offers to make, bigger values prevent the bot from loaning small available amounts but reduce loans fragmentation

minloansize = 0.001
# AutoRenew - if set to 1 the bot will set the AutoRenew flag for the loans when you stop it (Ctrl+C) and clear the AutoRenew flag when on started

autorenew = 0
# custom config per coin, useful when closing positions etc.
# syntax: ["COIN:mindailyrate:maxactiveamount",...]
# if maxactive amount is 0 - stop lending this coin. in the future you'll be able to limit amount to be lent.
# coinconfig = ["BTC:0.18:1","CLAM:0.6:1"]
# this option creates a json log file instead of console output which includes the most recent status
# uncomment both jsonfile and jsonlogsize to enable
# jsonfile = www/botlog.json
# limits the amount of log lines to save
# jsonlogsize = 200
# enables a webserver for the www folder, in order to easily use the lendingbot.html with the json log
# startWebServer = true

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:18 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
sgwanleecommented, Oct 9, 2017

Hi, I know it’s out-dated issue. I have same problem and here’s how i fix it.

python 2.7.14 window server 2016

poloniex use globalsign for ssl certificate. so I copy and paste globalsign’s root certificate into python’s cacert.pem file.

here’s link for globalsign

and here’s python script to check where your cacert.pem file is. from requests.utils import DEFAULT_CA_BUNDLE_PATH; print(DEFAULT_CA_BUNDLE_PATH)

1reaction
rnevetcommented, Mar 7, 2017

@Evanito I would not add this, bypassing ssl certificate should only be done by someone understanding the risks. The ssl fail is a local configuration issue, not a Bot issue -> no code change.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - urllib and "SSL: CERTIFICATE_VERIFY_FAILED" Error
If you have installed Python 3.6 on OSX and are getting the "SSL: CERTIFICATE_VERIFY_FAILED" error when trying to connect to an https:// site,...
Read more >
4 Ways to fix SSL: CERTIFICATE_VERIFY_FAILED in Python
SSL certificate_verify_failed errors typically occur as a result of outdated Python default certificates or invalid root certificates. We will cover how to ...
Read more >
What is an SSL 'Certificate_Verify_Failed' Error and How Do I ...
SSL certificate_verify_failed errors typically occur as a result of outdated Python default certificates or invalid root certificates. If you're a website owner ...
Read more >
How to Fix SSL: CERTIFICATE_VERIFY_FAILED Error In ...
Another error that is common in Python is pip SSL certificate_verify_failed. Especially when you are installing Python packages into an ...
Read more >
[Solved] urllib.error.URLError: [SSL - Clay-Technology World
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:847)>. I never got this error in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found