Xonshiz / comic-dl

Comic-dl is a command line tool to download manga and comics from various comic and manga sites. Supported sites : readcomiconline.to, mangafox.me, comic naver and many more.
https://github.com/Xonshiz/comic-dl
MIT License
545 stars 68 forks source link

Cirular import error #288

Closed Rebanar closed 3 years ago

Rebanar commented 3 years ago

Starting with the recent builds which drop python 2 support, I get an error when trying to run. I tried on both Windows and Linux and get the error with the compiled files.

Traceback (most recent call last): File "main.py", line 4, in File "PyInstaller\loader\pyimod03_importers.py", line 540, in exec_module File "init.py", line 8, in ImportError: cannot import name 'ComicDL' from partially initialized module 'comic_dl' (most likely due to a circular import) (C:\Users\***\AppData\Local\Temp_MEI2562\comic_dl__init.pyc) [4104] Failed to execute script main__

Xonshiz commented 3 years ago

Which python version are you on? Check your environment because these builds ran successfully on Linux, Windows and MacOS. I am not sure why you're even getting error with "Pyinstaller" in that error. How are you trying to execute this script?

Rebanar commented 3 years ago

Windows:

Python is 3.9.5 Python 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] on win32 As far as executing it, I downloaded the compiled comic_dl.exe and tried to run it.

Linux:

Python is 3.8.5 Python 3.8.5 (default, May 27 2021, 13:30:53) I'm executing it by running the comic_dl_linux compiled binary. Its error is similar to Windows, so I didn't include it, but in case it's helpful it's

./comic_dl_linux DEPRECATION: The OpenSSL being used by this python install (OpenSSL 1.0.2g 1 Mar 2016) does not meet the minimum supported version (>= OpenSSL 1.1.1) in order to support TLS 1.3 required by Cloudflare, You may encounter an unexpected Captcha or cloudflare 1020 blocks. Traceback (most recent call last): File "main.py", line 4, in File "PyInstaller/loader/pyimod03_importers.py", line 540, in exec_module File "init.py", line 8, in ImportError: cannot import name 'ComicDL' from partially initialized module 'comic_dl' (most likely due to a circular import) (/tmp/_MEIS4z1IK/comic_dl/init.pyc) [6224] Failed to execute script main

Xonshiz commented 3 years ago

Got it.. thanks for the info. I'll take a look as soon as I get some time.

SilkyGator commented 3 years ago

Came here to say, I have this exact same error on windows

scytalezero commented 3 years ago

I'm also seeing this error on Windows with Python 3.9.5 installed using the binary release.

Aemilian666 commented 3 years ago

This error is still relevant.

image

Aemilian666 commented 3 years ago

image

StrangeDOS commented 3 years ago

Any traction on this? I'm also seeing it when using the Windows binary. image

Xonshiz commented 3 years ago

Not yet.... haven't gotten time to look into this. Will try to do it this weekend...

StrangeDOS commented 3 years ago

Thanks Xonshiz. Long time, no see. :)

BTW, it looks like one of the Jun 4th updates was where it started going wrong. Unfortunately you can't use anything before that because of the domain name change to readcomiconline.li

Xonshiz commented 3 years ago

Hey, yep... long time no see :D hahaha good to see your name back here :D

And yes, the issue started coming when I put this on the CI pipeline to automate distributable builds. Not sure why it's causing the issue now.... but, I think I know about the fix. Just have to experiment a few things... :(

StrangeDOS commented 3 years ago

I can't help with the coding but as usual, I'm up for testing when you get something ready.

Xonshiz commented 3 years ago

Fixed this with latest merge. Tested on windows and the binary was printing the version at least. Feel free to update me if there's any such issue.