vapoursynth / vsrepo

A simple package repository for VapourSynth
MIT License
113 stars 29 forks source link

vsrepo error HTTP Error 404: Not Found #70

Closed hydra3333 closed 6 years ago

hydra3333 commented 6 years ago

Hello, I ran vsrepo today (for the first time in circa a week) and received the error below.

Suggestions would be appreciated.

.\python.exe .\vsrepo.py -p -t win64 -f -b vapoursynth64\plugins\dll-to-choose-from -s vapoursynth64\scripts installed
Name                      Namespace       Installed   Latest      Identifier
adjust                    adjust          v1          v1          adjust
Bifrost                   bifrost         v2.2        v2.2        com.nodame.bifrost
Bilateral                 bilateral       r3          r3          com.invalid.identifier.bilateral
BM3D                      bm3d            r7          r7          com.vapoursynth.bm3d
Cnr2                      cnr2            v1          v1          com.nodame.cnr2
CTMF                      ctfm            r4          r4          com.holywu.ctmf
D2V Source                d2v             v1.1        v1.1        com.sources.d2vsource
DCTFilter                 dctf            r2          r2          com.holywu.dctfilter
Deblock                   deblock         r6          r6          com.holywu.deblock
DeLogo                    delogo          v0.4        v0.4        in.7086.delogo
DFTTest                   dfttest         r4          r4          com.holywu.dfttest
+DGHDRtoSDR               dghdrtosdr      Unknown     1.9         com.vapoursynth.dghdrtosdr
degrainmedian             dgm             v1          v1          com.nodame.degrainmedian
edi_rpow2                 edi_rpow2       rev29       rev29       edi_rpow2
EEDI2                     eedi2           r7          r7          com.holywu.eedi2
EEDI3m                    eedi3m          r3          r3          com.holywu.eedi3
FFmpegSource2             ffms2           2.23        2.23        com.vapoursynth.ffms2
FFT3DFilter               fft3dfilter     R1          R1          systems.innocent.fft3dfilter
FFTW3 Library             fftw3_library   3.3.5       3.3.5       org.fftw.fftw3
fmtconv                   fmtc            r20         r20         fmtconv
TemporalSoften2           focus2          v1          v1          chikuzen.does.not.have.his.own.domain.focus2
AddGrain                  grain           r6          r6          com.holywu.addgrain
havsfunc                  havsfunc        r30         r30         havsfunc
hnwvsfunc                 hnwvsfunc       v1.33       v1.33       hnwvsfunc
HQDn3D                    hqdn3d          r2.0.1      r2.0.1      com.vapoursynth.hqdn3d
KNLMeansCL                knlm            v1.1.1      v1.1.1      com.Khanattila.KNLMeansCL
muvsfunc                  muvsfunc        v0.2.0      v0.2.0      muvsfunc
MVTools                   mv              v20         v20         com.nodame.mvtools
mvmulti                   mvmulti         r9          r9          mvmulti
MVTools (float)           mvsf            r9          r9          com.nodame.mvsf
mvsfunc                   mvsfunc         r8          r8          mvsfunc
NNEDI3                    nnedi3          v12         v12         com.deinterlace.nnedi3
NNEDI3CL                  nnedi3cl        r7          r7          com.holywu.nnedi3cl
nnedi3_resample           nnedi3_resample git:0983895 git:0983895 nnedi3_resample
nnedi3_rpow2              nnedi3_rpow2    rev3        rev3        nnedi3_rpow2
NNEDI3 Weights            nnedi3_weights  r1          r1          com.deinterlace.nnedi3.weights
Oyster                    Oyster          git:54fe6c3 git:54fe6c3 oyster
Plum                      Plum            git:f5d40e2 git:f5d40e2 plum
Retinex                   retinex         r3          r3          com.invalid.identifier.retinex
RGVS (float)              rgsf            r5          r5          com.vapoursynth.removegrainsf
SangNom                   sangnom         r40         r40         com.mio.sangnom
TCanny                    tcanny          r10         r10         com.holywu.tcanny
TDeintMod                 tdm             r10         r10         com.holywu.tdeintmod
TemporalMedian            tmedian         v1          v1          com.nodame.temporalmedian
TNLMeans                  tnlm            git:22a40af git:22a40af systems.innocent.tnlm
Tonemap                   tonemap         R2          R2          com.ifb.tonemap
TTempSmooth               ttmpsm          r3          r3          com.holywu.ttempsmooth
vcfreq                    vcfreq          2016-05-12  2016-05-12  in.vcmohan.freq
vcmod                     vcmod           2017-10-17  2017-10-17  in.vcmohan.mod
VagueDenoiser             vd              r2          r2          com.holywu.vaguedenoiser
Vine                      Vine            git:a6e68cd git:a6e68cd vine
VSFilter                  vsf             r2          r2          com.holywu.vsfilter
VSFilterMod               vsfm            r5.2        r5.2        com.holywu.vsfiltermod
Waifu2x                   w2xc            r7          r7          com.holywu.waifu2x-w2xc
Waifu2x models            w2xc_models     r7          r7          com.holywu.waifu2x-w2xc.models
W3FDIF                    w3fdif          r1          r1          com.holywu.w3fdif
AWarpSharp2               warp            v4          v4          com.nodame.awarpsharp2
Yadifmod                  yadifmod        r10         r10         com.holywu.yadifmod
ZNEDI3                    znedi3          r1          r1          xxx.abc.znedi3

C:\SOFTWARE\Vapoursynth-x64>.\python.exe .\vsrepo.py -p -t win64 -f -b vapoursynth64\plugins\dll-to-choose-from -s vapoursynth64\scripts upgrade-all
Traceback (most recent call last):
  File ".\vsrepo.py", line 455, in <module>
    inst = upgrade_all_packages(args.force)
  File ".\vsrepo.py", line 368, in upgrade_all_packages
    res = upgrade_files(get_package_from_id(id, True))
  File ".\vsrepo.py", line 346, in upgrade_files
    install_files(p)
  File ".\vsrepo.py", line 288, in install_files
    data = fetch_url_cached(url, p['name'] + ' ' + install_rel['version'])
  File ".\vsrepo.py", line 132, in fetch_url_cached
    data = fetch_ur1(url, desc)
  File ".\vsrepo.py", line 113, in fetch_ur1
    with urllib.request.urlopen(url) as urlreq:
  File "urllib\request.py", line 223, in urlopen
  File "urllib\request.py", line 532, in open
  File "urllib\request.py", line 642, in http_response
  File "urllib\request.py", line 570, in error
  File "urllib\request.py", line 504, in _call_chain
  File "urllib\request.py", line 650, in http_error_default
urllib.error.HTTPError: HTTP Error 404: Not Found
hydra3333 commented 6 years ago

Ah. Added these debug lines in fetch_ur1

    print('fetch_ur1 url:  ' + url)
    print('fetch_ur1 desc: ' + url)

and saw

.\python.exe .\vsrepo.py -p -t win64 -f -b vapoursynth64\plugins\dll-to-choose-from -s vapoursynth64\scripts upgrade-all
fetch_ur1 url:  http://rationalqm.us/hdr/DGHDRtoSDR_1.9.rar
fetch_ur1 desc: http://rationalqm.us/hdr/DGHDRtoSDR_1.9.rar
Traceback (most recent call last):
  File ".\vsrepo.py", line 457, in <module>
    inst = upgrade_all_packages(args.force)
  File ".\vsrepo.py", line 370, in upgrade_all_packages
    res = upgrade_files(get_package_from_id(id, True))
  File ".\vsrepo.py", line 348, in upgrade_files
    install_files(p)
  File ".\vsrepo.py", line 290, in install_files
    data = fetch_url_cached(url, p['name'] + ' ' + install_rel['version'])
  File ".\vsrepo.py", line 134, in fetch_url_cached
    data = fetch_ur1(url, desc)
  File ".\vsrepo.py", line 115, in fetch_ur1
    with urllib.request.urlopen(url) as urlreq:
  File "urllib\request.py", line 223, in urlopen
  File "urllib\request.py", line 532, in open
  File "urllib\request.py", line 642, in http_response
  File "urllib\request.py", line 570, in error
  File "urllib\request.py", line 504, in _call_chain
  File "urllib\request.py", line 650, in http_error_default
urllib.error.HTTPError: HTTP Error 404: Not Found

I'll check in with DG's website to clarify his position in regard to .zip files (rather than .rar as previously discussed in relation to portable 7zip) and about the possibility of retaining older versions for vsrepo compatibility.

theChaosCoder commented 6 years ago

Another possibility would be to just skip an 404 error. Just print a msg "404 file not found, skipping download" or something like that. I'm sure that some of the non git links will also fail in the future...

myrsloik commented 6 years ago

Yes, I'll probably make it try and skip. Plus a user friendly warning to go with it. Haven't really had this happen before.

myrsloik commented 6 years ago

Now it simply skips packages where the fetch operation fails and reports the failures at the end of the operation. Combined with the delayed uninstall of previous packages things should be more robust now. Grab latest git and try it out because I may have a typo here or there...