Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enma Import Error #55

Closed
somewhat69 opened this issue Dec 10, 2023 · 9 comments · Fixed by #56
Closed

Enma Import Error #55

somewhat69 opened this issue Dec 10, 2023 · 9 comments · Fixed by #56
Assignees
Labels
bug Something isn't working

Comments

@somewhat69
Copy link

ImportError: cannot import name 'DefaultAvailableSources' from 'enma' (C:\Users\USER\AppData\Local\Programs\Python\Python310\lib\site-packages\enma_init_.py)

I'm on python 3.10.6 and windows

@AlexandreSenpai AlexandreSenpai self-assigned this Dec 11, 2023
@AlexandreSenpai AlexandreSenpai added the bug Something isn't working label Dec 11, 2023
@AlexandreSenpai
Copy link
Owner

Thanks for reporting this bug. I'm going to fix it.
While it isnt fixed, you can just use: "nhentai" or "manganato" as default available sources

@somewhat69
Copy link
Author

somewhat69 commented Dec 13, 2023

ah ok thanks . can you provide me a example please?

@AlexandreSenpai
Copy link
Owner

AlexandreSenpai commented Dec 16, 2023

Yeah, Sure.

from enma import Enma
from enma.infra.adapters.repositories.nhentai import CloudFlareConfig, NHentai

enma = Enma()
enma.source_manager.set_source('nhentai') # or enma.source_manager.set_source('manganato') 

if enma.source_manager.source:
    enma.source_manager.source.set_config(config=CloudFlareConfig(cf_clearance='',
                                                                      user_agent=''))

manga = enma.get(identifier='475219')

if manga:
    print(manga)

@AlexandreSenpai
Copy link
Owner

New version is now available

pip install Enma==2.2.0

@somewhat69
Copy link
Author

thanks

@somewhat69
Copy link
Author

Traceback (most recent call last):
File "c:\Users\USER\Documents\test.py", line 1, in
from enma import Enma
File "C:\Users\USER\AppData\Local\Programs\Python\Python310\lib\site-packages\enma_init_.py", line 2, in
from enma.infra.entrypoints.lib import Enma, SourcesEnum, DefaultAvailableSources
File "C:\Users\USER\AppData\Local\Programs\Python\Python310\lib\site-packages\enma\infra\entrypoints\lib_init_.py", line 9, in
from enma.application.core.interfaces.manga_repository import IMangaRepository
File "C:\Users\USER\AppData\Local\Programs\Python\Python310\lib\site-packages\enma\application\core\interfaces\manga_repository.py", line 4, in
from enma.domain.entities.manga import Manga
domain\entities\manga.py", line 8, in
from enma.domain.core.interfaces.downloader import IDownloader
ModuleNotFoundError: No module named 'enma.domain.core' Apparently an another error

@AlexandreSenpai
Copy link
Owner

Fixed at version 2.2.1

image
pip install enma==2.2.1

@somewhat69
Copy link
Author

ah k

@somewhat69
Copy link
Author

somewhat69 commented Dec 21, 2023

many thanks to you it finally works. any way to get page number thourgh this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants