VoxelCubes / PanelCleaner

An AI-powered tool to clean manga panels.
GNU General Public License v3.0
224 stars 17 forks source link

Error Traceback (most recent call last) #9

Closed nyarino015 closed 1 year ago

nyarino015 commented 1 year ago

Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "C:\Users\ANIX\AppData\Local\Programs\Python\Python311\Scripts\pcleaner.exe__main.py", line 4, in File "C:\Users\ANIX\AppData\Local\Programs\Python\Python311\Lib\site-packages\pcleaner\main.py", line 124, in import pcleaner.masker as cl File "C:\Users\ANIX\AppData\Local\Programs\Python\Python311\Lib\site-packages\pcleaner\masker.py", line 6, in import pcleaner.image_ops as ops File "C:\Users\ANIX\AppData\Local\Programs\Python\Python311\Lib\site-packages\pcleaner\image_ops.py", line 11, in import pcleaner.structures as st File "C:\Users\ANIX\AppData\Local\Programs\Python\Python311\Lib\site-packages\pcleaner\structures.py", line 9, in import magic File "C:\Users\ANIX\AppData\Local\Programs\Python\Python311\Lib\site-packages\magic\init__.py", line 209, in libmagic = loader.load_lib() ^^^^^^^^^^^^^^^^^ File "C:\Users\ANIX\AppData\Local\Programs\Python\Python311\Lib\site-packages\magic\loader.py", line 49, in load_lib raise ImportError('failed to find libmagic. Check your installation') ImportError: failed to find libmagic. Check your installation

VoxelCubes commented 1 year ago

Windows isn't officially supported, but it should be possible for it to work on it. In this case, you can try pip uninstall python-magic and then pip install python-magic-bin If that doesn't work, then you should try running this through WSL. I don't use Windows, so I can't help you with that either, unfortunately.

Once I finish the GUI in a month or two, I will try to offer a dedicated windows .exe for such cases.

FlukRocker commented 11 months ago

hi after i delete python-magic now i got this new error

Encountered an error while processing files.

<class 'AttributeError'>: Traceback (most recent call last): File "C:\Python311\Lib\site-packages\pcleaner\gui\worker_thread.py", line 141, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\pcleaner\gui\mainwindow_driver.py", line 1064, in generate_output prc.generate_output( File "C:\Python311\Lib\site-packages\pcleaner\gui\processing.py", line 228, in generate_output ocr_analytic = pp.prep_json_file( ^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\pcleaner\preprocessor.py", line 114, in prep_json_file page_data.grow_boxes(preprocessor_conf.box_padding_initial, st.BoxType.BOX) File "C:\Python311\Lib\site-packages\pcleaner\structures.py", line 205, in grow_boxes boxes[i] = box.pad(padding, self.image_size) ^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\pcleaner\structures.py", line 177, in image_size metadata = magic.from_file(self.image_path) ^^^^^^^^^^^^^^^ AttributeError: module 'magic' has no attribute 'from_file'

module 'magic' has no attribute 'from_file'

VoxelCubes commented 10 months ago

You forgot to install python-magic-bin afterwards as the replacement. I'd only recommend installing with pip if you already know how to use python, as conflicts may arise with whatever is already in your python environment. Use the pre-built executable in the releases section https://github.com/VoxelCubes/PanelCleaner/releases or proceed at your own risk with pip.

FlukRocker commented 10 months ago

i'm already rollback to use prebuild. it might slower but it work fine.