Unmanic / unmanic

Unmanic - Library Optimiser
GNU General Public License v3.0
1.43k stars 84 forks source link

Plugins error 500 #274

Closed n-ramos closed 2 years ago

n-ramos commented 2 years ago

Hello guys,

Thanks for your library :)

Description

I have a little problem, when i want to download a plugin , i get a error 500

Steps to Reproduce

  1. Go to plugins
  2. Refresh repositories
  3. Click on install

Expected behavior: Install plugin

Actual behaviour: Get error 500 in console:

Failed to load resource: the server responded with a status of 500 (Failed to install/update plugin) on :8888/unmanic/api/v2/plugins/install

Preview response:

{"error": "500: Failed to install/update plugin", "messages": {}, "traceback": []}

Reproduces how often: always

Versions

0.1.4~655b18b

Installation Method Used

run through Docker

Thanks for help :)

n-ramos commented 2 years ago

Edit:

Little traceback

  File "/usr/local/lib/python3.8/dist-packages/requests/models.py", line 953, in raise_for_status

    raise HTTPError(http_error_msg, response=self)

requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://raw.githubusercontent.com/Unmanic/unmanic-plugins%0A/repo/encoder_video_h264_libx264/encoder_video_h264_libx264-0.0.8.zip

2022-01-11T22:06:31:ERROR:Unmanic.PluginsHandler - [FORMATTED] - Exception while installing plugin '{'plugin_id': 'encoder_video_h264_nvenc', 'name': 'Video Encoder H264 - h264_nvenc (NVIDIA GPU)', 'author': 'Josh.5', 'description': 'Ensure all video streams are encoded with the H264 codec using the h264_nvenc encoder.', 'version': '0.0.10', 'icon': 'https://raw.githubusercontent.com/Josh5/unmanic.plugin.encoder_video_h264_nvenc/master/icon.png', 'tags': 'video,encoder,ffmpeg,nvidia,library file test', 'status': {'installed': False}, 'package_url': 'https://raw.githubusercontent.com/Unmanic/unmanic-plugins\n/repo/encoder_video_h264_nvenc/encoder_video_h264_nvenc-0.0.10.zip', 'changelog_url': 'https://raw.githubusercontent.com/Unmanic/unmanic-plugins\n/repo/encoder_video_h264_nvenc/changelog.md', 'repo_name': 'Official Repo', 'repo_id': '135210028059120413545147029152411777012'}'. - 404 Client Error: Not Found for url: https://raw.githubusercontent.com/Unmanic/unmanic-plugins%0A/repo/encoder_video_h264_nvenc/encoder_video_h264_nvenc-0.0.10.zip

Traceback (most recent call last):

I think \n is a problem :)

krullos commented 2 years ago

Seeing 404 issue whenever I attempt to install any plugin too:

2022-01-12T13:12:48:INFO:Unmanic.PluginsHandler - [FORMATTED] - Repo cache file '/config/.unmanic/plugins/repo-238064833263732537708657413575856466270.json'.

2022-01-12T13:12:55:ERROR:Unmanic.PluginsHandler - [FORMATTED] - Exception while installing plugin '{'plugin_id': 'encoder_video_hevc_nvenc', 'name': 'Video Encoder H265/HEVC - hevc_nvenc (NVIDIA GPU)', 'author': 'Josh.5', 'description': 'Ensure all video streams are encoded with the H265/HEVC codec using the hevc_nvenc encoder.', 'version': '0.0.9', 'icon': 'https://raw.githubusercontent.com/Josh5/unmanic.plugin.encoder_video_hevc_nvenc/master/icon.png', 'tags': 'video,encoder,ffmpeg,nvidia,library file test', 'status': {'installed': False}, 'package_url': 'https://raw.githubusercontent.com/Unmanic/unmanic-plugins\n/repo/encoder_video_hevc_nvenc/encoder_video_hevc_nvenc-0.0.9.zip', 'changelog_url': 'https://raw.githubusercontent.com/Unmanic/unmanic-plugins\n/repo/encoder_video_hevc_nvenc/changelog.md', 'repo_name': 'Official Repo', 'repo_id': '238064833263732537708657413575856466270'}'. - 404 Client Error: Not Found for url: https://raw.githubusercontent.com/Unmanic/unmanic-plugins%0A/repo/encoder_video_hevc_nvenc/encoder_video_hevc_nvenc-0.0.9.zip

Traceback (most recent call last):

  File "/usr/local/lib/python3.8/dist-packages/unmanic/libs/plugins.py", line 376, in install_plugin

    r.raise_for_status()

  File "/usr/local/lib/python3.8/dist-packages/requests/models.py", line 953, in raise_for_status

    raise HTTPError(http_error_msg, response=self)

requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://raw.githubusercontent.com/Unmanic/unmanic-plugins%0A/repo/encoder_video_hevc_nvenc/encoder_video_hevc_nvenc-0.0.9.zip

If I remove the "%0A" from the url (after unmanic-plugins) then I'm able to download the .zip file locally

vwieczorek commented 2 years ago

Editing /unmanic/.unmanic/plugins/repo-10962643616459600699920893830666900793.json to remove the '/n' in each line shown below fixes the issue for me:

From:

        "repo_data_directory": "https://raw.githubusercontent.com/Unmanic/unmanic-plugins\n/repo/",
        "repo_data_url": "https://raw.githubusercontent.com/Unmanic/unmanic-plugins\n/repo/repo/repo.json"

To:

        "repo_data_directory": "https://raw.githubusercontent.com/Unmanic/unmanic-plugins/repo/",
        "repo_data_url": "https://raw.githubusercontent.com/Unmanic/unmanic-plugins/repo/repo/repo.json"
n-ramos commented 2 years ago

Yeah i did it that yesterday, i just refresh today the repositories to check if it's ok, and it seems josh did a fix on that :)

Josh5 commented 2 years ago

Yup. Sorry about that guys. Thanks for reporting