Infiziert90 / getnative

Find the native resolution(s) of upscaled material (mostly anime)
MIT License
218 stars 16 forks source link

Error displaying #24

Closed Ironclad17 closed 1 year ago

Ironclad17 commented 1 year ago

getnative.exe "Input.png" -pf png -pg Gave the following error. Installed and dependencies were updated via pip beforehand. C:\Users\***\AppData\Local\Programs\Python\Python310\lib\site-packages\numpy\core\getlimits.py:518: UserWarning: The value of the smallest subnormal for <class 'numpy.float64'> type is zero. setattr(self, word, getattr(machar, word).flat[0]) C:\Users\***\AppData\Local\Programs\Python\Python310\lib\site-packages\numpy\core\getlimits.py:89: UserWarning: The value of the smallest subnormal for <class 'numpy.float64'> type is zero. return self._float_to_str(self.smallest_subnormal) C:\Users\***\AppData\Local\Programs\Python\Python310\lib\site-packages\getnative\app.py:247: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure. plot.show()

Infiziert90 commented 1 year ago

Could you share your image?

It seems like these are no errors and just warnings, but I would still want to investigate why it happens.

Ironclad17 commented 1 year ago

It happens with every image when -pg is set. The graphs are still being generated in results though.

Infiziert90 commented 1 year ago

Oh yeah, completely missed that.

Your matplotlib is not able to be called with the default renderer, that is why getnative swaps it with "agg" which is normally intended for systems with no desktop like server cli

So the error must be somewhere in your matplotlib version, can't really think of anything else

RivenSkaye commented 1 year ago

Could you provide the output of pip freeze to see if any graphical front-end bindings are available on your install? Also please list all Python versions currently installed on your system, as several projects are known to not always select the correct version (vspipe for example)

Ironclad17 commented 1 year ago

pip freeze

WARNING: Ignoring invalid distribution cas- (c:\users\sahil\appdata\roaming\python\python310\site-packages) AddGrain==10 adjust==0+a3af7cb appdirs==1.4.4 AWarpSharp2==4 Bilateral==3 BilateralGPU==9 BM3D==8 BM3DCUDA===2.12.cuda118 contourpy==1.0.7 CTMF==5 cycler==0.11.0 DCTFilter==2 Deblock==6 Descale==8 DFTTest==7 edi_rpow2==29 EEDI2==7 EEDI3m==4 FFmpegSource2==2.40 FFT3DFilter==2 FFTW3_Library==3.3.10 FluxSmooth==2 fmtconv==30 fonttools==4.38.0 fvsfunc==0+076dbde getnative==3.2.1 havsfunc==0+7f0a9a7 Histogram==2 HQDn3D==2.0.1 kagefunc==0+96947a1 kiwisolver==1.4.4 KNLMeansCL==1.1.1 LSMASHSource==0 matplotlib==3.7.0 Miscfilters__obsolete==2 muvsfunc==0+ec233aa mvsfunc==0+8b8f43a MVTools==23 Neo_f3kdb==9 NNEDI3==12 nnedi3_resample==0+314c644 NNEDI3_Weights==1 NNEDI3CL==8 numpy==1.24.2 packaging==23.0 Pillow==9.4.0 pyparsing==3.0.9 python-dateutil==2.8.2 RemoveGrain==1 Retinex==4 RGVS__float==5 SangNom==42 six==1.16.0 soifunc @ git+https://github.com/shssoichiro/soifunc.git@9e9cabcdc28581509124ae2d0428413fafe121bf TCanny==14 TemporalMedian==1 TTempSmooth==4.1 VapourSynth==61 VIVTC==1 vsutil==0.8.0 Yadifmod==10 ZNEDI3==2.1


python --version
Python 3.10.10
RivenSkaye commented 1 year ago

Seems like there are no GUI libs available on your Python install at all. You can solve the agg warning by installing either PyQt6 PyQt6-Qt6 PyQt6-sip or their PyQt5 versions. As for the other warnings, it seems that some binary wheel in your Python environment has been compiled with -ffast-math, -funsafe-math-optimizations or -Ofast (or some other (grouping) flags that cause the FZ and DAZ flags to be set), which is not something fixable from getnative without a rather invasive, x86_64-specific change that I'm not sure Infi would be all too thrilled about. Especially considering the fact that getnative is only meant to provide an indication of the native resolution and shouldn't be blindly assumed to be correct