meraki-analytics / cassiopeia

An all-inclusive Python framework for the Riot Games League of Legends API. Cass focuses on making the data easy and fun to work with, while providing all the tools necessary to create a website or do data analysis.
MIT License
553 stars 134 forks source link

pycurl.error: 51 #251

Closed marrrs88 closed 6 years ago

marrrs88 commented 6 years ago

When I tried to execute 'match.py' in 'examples' folder. It returns pycurl error 51. Could you help me out of this please?

(base) E:\test2>python 3.py Making call: https://ddragon.leagueoflegends.com/realms/na.json Making call: https://ddragon.leagueoflegends.com/cdn/8.17.1/data/en_US/championF ull.json Making call: https://na1.api.riotgames.com/lol/match/v3/matchlists/by-account/34 718348?beginIndex=0&endIndex=100 Making call: https://cdn.merakianalytics.com/riot/lol/resources/patches.json Traceback (most recent call last): File "C:\ProgramData\Anaconda2\envs\py3\lib\site-packages\merakicommons-1.0.5- py3.6.egg\merakicommons\cache.py", line 15, in wrapper AttributeError: 'Participant' object has no attribute '_lazy__champion'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "3.py", line 64, in print_newest_match(name="Kalturi", account=34718348, id=21359666, region="NA ") File "3.py", line 27, in print_newest_match champion_id = match.participants[summoner.name].champion.id File "C:\ProgramData\Anaconda2\envs\py3\lib\site-packages\merakicommons-1.0.5- py3.6.egg\merakicommons\cache.py", line 17, in wrapper File "E:\test2\cassiopeia\core\match.py", line 26, in wrapper return method(self, *args, **kwargs) File "E:\test2\cassiopeia\core\match.py", line 1145, in champion version = _choose_staticdata_version(self.__match) File "E:\test2\cassiopeia\core\match.py", line 59, in _choose_staticdata_versi on patch = Patch.from_date(match.creation, region=match.region) File "E:\test2\cassiopeia\core\patch.py", line 62, in from_date cls.load() File "E:\test2\cassiopeia\core\patch.py", line 84, in load data = configuration.settings.pipeline.get(PatchListDto, query={}) File "C:\ProgramData\Anaconda2\envs\py3\lib\site-packages\datapipelines-1.0.5- py3.6.egg\datapipelines\pipelines.py", line 459, in get File "C:\ProgramData\Anaconda2\envs\py3\lib\site-packages\datapipelines-1.0.5- py3.6.egg\datapipelines\pipelines.py", line 185, in get File "C:\ProgramData\Anaconda2\envs\py3\lib\site-packages\datapipelines-1.0.5- py3.6.egg\datapipelines\sources.py", line 69, in wrapper File "E:\test2\cassiopeia\datastores\merakianalyticscdn.py", line 40, in get_p atch_list body = self._client.get(url)[0] File "E:\test2\cassiopeia\datastores\common.py", line 119, in get status_code, body, response_headers = HTTPClient._get(url, headers, rate_lim iters, connection) File "E:\test2\cassiopeia\datastores\common.py", line 98, in _get status_code = HTTPClient._execute(curl, connection is None) File "E:\test2\cassiopeia\datastores\common.py", line 43, in _execute curl.perform() pycurl.error: (51, 'schannel: CertGetNameString() failed to match connection hos tname (cdn.merakianalytics.com) against server certificate names')

jjmaldonis commented 6 years ago

Can you try to pip install --upgrade cassiopeia (you should get version 3.0.20)? Hopefully that resolves the error.

If that doesn't solve the problem, please let me know so I can figure out why. That said, if you want to go forward and get more info about install pycurl, you can find some more info on our setup page here: https://cassiopeia.readthedocs.io/en/latest/setup.html

Edit: I actually may have misunderstood what was going on. I can't reproduce the problem tho. Does pip install certifi solve the issue?

marrrs88 commented 6 years ago

Thanks a lot for your kindest respones! I tried upgrade cass and install certifi. The issuse still exist. I will do more test and thanks again.

jjmaldonis commented 6 years ago

Fixed with commit c38ecb9