mattkjames7 / PyGeopack

Wrapper for geopack-08 used for the Tsyganenko magnetic field models
GNU General Public License v3.0
11 stars 2 forks source link

Connection Error when Updating OMNI indices #16

Open mshumko opened 1 year ago

mshumko commented 1 year ago

Hello again!

Upon first sucessfull import I got the message to update OMNI values. But upon running PyGeopack.Params.UpdateParameters() I got the following error.

>>> PyGeopack.Params.UpdateParameters()
This process may take a while, please be patient
Updating Kp Indices
No files to update.
Updating OMNI Data
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\shumkms1\AppData\Local\anaconda3\envs\mms_conjunctions\Lib\site-packages\PyGeopack\Params\UpdateParameters.py", line 41, in UpdateParameters
    omni.UpdateLocalData()
  File "C:\Users\shumkms1\AppData\Local\anaconda3\envs\mms_conjunctions\Lib\site-packages\pyomnidata\UpdateLocalData.py", line 23, in UpdateLocalData     
    status = _DownloadFTPIndex(ftp)
             ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\shumkms1\AppData\Local\anaconda3\envs\mms_conjunctions\Lib\site-packages\pyomnidata\_DownloadFTPIndex.py", line 20, in _DownloadFTPIndex 
    for file in files:
  File "C:\Users\shumkms1\AppData\Local\anaconda3\envs\mms_conjunctions\Lib\ftplib.py", line 590, in mlsd
    self.retrlines(cmd, lines.append)
  File "C:\Users\shumkms1\AppData\Local\anaconda3\envs\mms_conjunctions\Lib\ftplib.py", line 462, in retrlines
    with self.transfercmd(cmd) as conn, \
         ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\shumkms1\AppData\Local\anaconda3\envs\mms_conjunctions\Lib\ftplib.py", line 393, in transfercmd
    return self.ntransfercmd(cmd, rest)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\shumkms1\AppData\Local\anaconda3\envs\mms_conjunctions\Lib\ftplib.py", line 793, in ntransfercmd
    conn, size = super().ntransfercmd(cmd, rest)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\shumkms1\AppData\Local\anaconda3\envs\mms_conjunctions\Lib\ftplib.py", line 354, in ntransfercmd
    conn = socket.create_connection((host, port), self.timeout,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\shumkms1\AppData\Local\anaconda3\envs\mms_conjunctions\Lib\socket.py", line 851, in create_connection
    raise exceptions[0]
  File "C:\Users\shumkms1\AppData\Local\anaconda3\envs\mms_conjunctions\Lib\socket.py", line 836, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it

Considering this may a temporary server glitch, I've run this command a few more times to no avail.

mattkjames7 commented 1 year ago

Hello! I have tried running this in both Linux and Windows using the latest version (1.0.1) but I cannot reproduce it - in both cases it works as expected. What version of pyomnidata and Python are you using?