Skip to content

FileNotFoundError: [Errno 2] No such file or directory #395

Description

@frapell

Hola, estoy intentando generar un dump de la wikpedia y cuando corro ./cdpetron.py falla de la siguiente manera

$ ./cdpetron.py --image-type beta --test-mode /trabajo/dump-wiki/ es
2021-12-15 15:06:11,590  cdpetron             INFO     Opened succesfully image type config file 'imagtypes.yaml'
2021-12-15 15:06:11,593  cdpetron             INFO     Opened succesfully language config file 'languages.yaml'
2021-12-15 15:06:11,593  cdpetron             INFO     Dump directory: '/trabajo/dump-wiki'
2021-12-15 15:06:11,593  cdpetron             INFO     Generating for language: 'es'
2021-12-15 15:06:11,593  cdpetron             INFO     Language config: {'include': ['Wikipedia:Acerca_de', 'Wikipedia:Limitación_general_de_responsabilidad', 'Wikipedia:Aviso_de_riesgo', 'Wikipedia:Aviso_médico', 'Wikipedia:Aviso_legal', 'Wikipedia:Aviso_de_contenido', 'Wikipedia:Derechos_de_autor', 'Wikipedia:Portal'], 'portal_index': 'Portal:Portada', 'python_docs': 'https://docs.python.org/es/3.8/archives/python-3.8.5-docs-html.tar.bz2', 'language_name': {'es': 'Castellano', 'en': 'Spanish'}}
2021-12-15 15:06:11,594  cdpetron             INFO     Options: nolists=False noscrap=False noclean=False test=True
2021-12-15 15:06:11,594  cdpetron             INFO     Date of generation saved: 20211215
2021-12-15 15:06:11,599  cdpetron             INFO     Getting list file: 'http://dumps.wikimedia.org/eswiki/latest/eswiki-latest-all-titles-in-ns0.gz'
2021-12-15 15:06:22,314  cdpetron             INFO     Downloaded 3549527 general articles
2021-12-15 15:06:22,314  cdpetron             INFO     Getting the articles from namespaces (with limit=50)
2021-12-15 15:06:26,789  cdpetron             INFO     Got 1898 namespace articles
2021-12-15 15:06:26,789  cdpetron             INFO     Have 8 articles to mandatorily include
2021-12-15 15:06:26,790  cdpetron             INFO     Total of articles: 3551433
2021-12-15 15:06:26,792  cdpetron             INFO     Scraping portal main page Portal:Portada
2021-12-15 15:06:26,792  src.scraping.scraper INFO     Generando DataURLs
2021-12-15 15:06:26,793  src.utiles           INFO     Starting pooled exec! done before: 0,  total: 1
2021-12-15 15:06:36,840  src.utiles           INFO     Scraping done! Total=1  ok=0  bad=1
2021-12-15 15:06:36,840  cdpetron             INFO     Parsing portal page
Traceback (most recent call last):
  File "./cdpetron.py", line 472, in <module>
    main(
  File "./cdpetron.py", line 337, in main
    scrap_portal(language, lang_config)
  File "./cdpetron.py", line 255, in scrap_portal
    with open(portal_filepath, 'rt', encoding='utf8') as fh:
FileNotFoundError: [Errno 2] No such file or directory: '/trabajo/dump-wiki/es/articles/P/o/r/Portal:Portada'

Obvio que /trabajo/dump-wiki/ existe...

Intente con otros parametros para --image-type en base a lo que hay en imagtypes.yaml pero no consigo que funcione de ninguna manera

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions