Skip to content

"list index out of range" error -- need to update script for Downloads API v3? #17

@jlg89

Description

@jlg89

This is on macOS 10.13.6 (old, I know), Python 3.9.23 (via MacPorts). Been working previously. Not sure when it started throwing the "list index out of range" error.

+==========================================================================+
|     _____                              __  __          __      __        |
|    / ___/___  ______   _____  _____   / / / /___  ____/ /___ _/ /____    |
|    \__ \/ _ \/ ___/ | / / _ \/ ___/  / / / / __ \/ __  / __ `/ __/ _ \   |
|   ___/ /  __/ /   | |/ /  __/ /     / /_/ / /_/ / /_/ / /_/ / /_/  __/   |
|  /____/\___/_/    |___/\___/_/      \____/ .___/\__,_/\__,_/\__/\___/    |
|                                         /_/                              |
+==========================================================================+

[PaperMC Server Updater]
[Handles the checking, downloading, and installation of server versions]
[Written by: Owen Cochell]

# Loading configuration data from file [/usr/local/minecraft/version_history.json] ...

Server Version Information:
  > Version: [1.21.6]
  > Build: [28]
[ --== Checking For New Version: ==-- ]

Loading version information ...
# Comparing local <> remote server versions ...
# No new version available.
# Loading build information ...
# Comparing local <> remote builds ...
# New build available! - [Build: 46]

[ --== Version check complete! ==-- ]

[ --== Version Selection: ==-- ]

# Loading version information ...
# Selecting latest version - [1.21.6] ...
# Loading build information ...
# Selecting latest build - [46] ...

You have selected:
   > Version: [1.21.6]
   > Build: [46]

[ --== Version Selection Complete! ==-- ]

# Creating temporary directory...
# Temporary directory created at: /tmp/tmp9x_ji9ww

[ --== Starting Download: ==-- ]


+==================================================+
> !ATTENTION! >
An error occurred during a request operation.
Fail Point: File Download
Your check/update operation will be canceled.
Detailed error info below:
+==================================================+
  [ --== The Following Error Has Occurred: ==-- ]
+==================================================+
Error Name: list index out of range
+==================================================+
Full Traceback:
Traceback (most recent call last):
  File "/usr/local/minecraft/./server_update.py", line 1523, in get_new
    path = self.update.download_file(self.fileutil.temp.name, ver, build_num=build, call=progress_bar, check=self.integrity)
  File "/usr/local/minecraft/./server_update.py", line 525, in download_file
    path = os.path.join(path, data.getheader('content-disposition', default='').split("''")[1])
IndexError: list index out of range
+==================================================+
(Can you make anything of this?)
Please check the github page for more info: https://github.com/Owen-Cochell/PaperMC-Update.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions