open-aviation / pyopensky

The Python interface for OpenSky database
https://open-aviation.github.io/pyopensky/
GNU Lesser General Public License v3.0
54 stars 13 forks source link

Error when running sample program in pymodes-opensky #1

Closed ChenhuiAn-git closed 4 years ago

ChenhuiAn-git commented 4 years ago

My Opensky network account has been authorized to access the OpenSky Impala database, but when I run the sample program in pymodes-opensky, I get an error and cannot access data.opensky-network.org. In addition, the username and password (my Opensky Network login and password) in the secret.conf file have been filled in. After I install the pymode-opensky module, I get errors when I run the sample program. Excuse me, why is the program not running? Thank you very much! The test procedure is as follows:

from pymodes_opensky import EHSHelper
ehs = EHSHelper()
df = ehs.get(
    icao24="845dcc",
    start="2020-03-20 19:50:00",
    end="2020-03-20 19:55:00"
)

The errors that occur are as follows:

WARNING:root:Error connecting to data.opensky-network.org
Traceback (most recent call last):
  File "C:\Users\Administrator\Anaconda3\envs\evn-traffic\lib\site-packages\pymodes_opensky\ssh_client.py", line 59, in connect
    host_name, **self.connect_kwargs
  File "C:\Users\Administrator\Anaconda3\envs\evn-traffic\lib\site-packages\paramiko\client.py", line 446, in connect
    passphrase,
  File "C:\Users\Administrator\Anaconda3\envs\evn-traffic\lib\site-packages\paramiko\client.py", line 764, in _auth
    raise saved_exception
  File "C:\Users\Administrator\Anaconda3\envs\evn-traffic\lib\site-packages\paramiko\client.py", line 751, in _auth
    self._transport.auth_password(username, password)
  File "C:\Users\Administrator\Anaconda3\envs\evn-traffic\lib\site-packages\paramiko\transport.py", line 1509, in auth_password
    return self.auth_handler.wait_for_response(my_event)
  File "C:\Users\Administrator\Anaconda3\envs\evn-traffic\lib\site-packages\paramiko\auth_handler.py", line 250, in wait_for_response
    raise e
paramiko.ssh_exception.AuthenticationException: Authentication failed.
Traceback (most recent call last):
  File "C:/Users/Administrator/Desktop/traffic-test/traffic-ce001.py", line 8, in <module>
    ehs = EHSHelper()
  File "C:\Users\Administrator\Anaconda3\envs\evn-traffic\lib\site-packages\pymodes_opensky\ehs_helper.py", line 14, in __init__
    self.opensky = OpenskyImpalaWrapper()
  File "C:\Users\Administrator\Anaconda3\envs\evn-traffic\lib\site-packages\pymodes_opensky\opensky_impala_wrapper.py", line 57, in __init__
    compress=True,
  File "C:\Users\Administrator\Anaconda3\envs\evn-traffic\lib\site-packages\pymodes_opensky\ssh_client.py", line 59, in connect
    host_name, **self.connect_kwargs
  File "C:\Users\Administrator\Anaconda3\envs\evn-traffic\lib\site-packages\paramiko\client.py", line 446, in connect
    passphrase,
  File "C:\Users\Administrator\Anaconda3\envs\evn-traffic\lib\site-packages\paramiko\client.py", line 764, in _auth
    raise saved_exception
  File "C:\Users\Administrator\Anaconda3\envs\evn-traffic\lib\site-packages\paramiko\client.py", line 751, in _auth
    self._transport.auth_password(username, password)
  File "C:\Users\Administrator\Anaconda3\envs\evn-traffic\lib\site-packages\paramiko\transport.py", line 1509, in auth_password
    return self.auth_handler.wait_for_response(my_event)
  File "C:\Users\Administrator\Anaconda3\envs\evn-traffic\lib\site-packages\paramiko\auth_handler.py", line 250, in wait_for_response
    raise e
paramiko.ssh_exception.AuthenticationException: Authentication failed.
junzis commented 4 years ago

This sounds like a temporary connection problem if you are certain your account has access the Impala shell. Is it still a problem now?

ChenhuiAn-git commented 4 years ago

如果您确定自己的帐户可以访问Impala shell,这听起来像是临时连接问题。现在还是问题吗?

Thank you very much! My problem is solved. The reason was that my username and password were entered incorrectly.