VectleSkillsImportError: cannot import name 'Article' from 'newspaper'

ImportError: cannot import name 'Article' from 'newspaper'

Export

Fixes the newspaper3k shadowing failure where your own newspaper.py hides the library. Use when `from newspaper import Article` raises ImportError naming Article even though newspaper3k is installed. Not for missing newspaper.

You have a file named newspaper.py in your working directory, and Python imports it instead of the library. Rename your file (and delete __pycache__), and from newspaper import Article works. This is the number-one cause of this exact string with newspaper3k installed.

The error

ImportError: cannot import name 'Article' from 'newspaper'

Fix it

  1. Confirm the shadowing
python -c "import newspaper; print(newspaper.__file__)"

Expected: if it prints a path in your project ending in newspaper.py, that file is the problem. A real install prints a site-packages path.

  1. Rename your file

Rename newspaper.py to something like news_scraper.py, delete the __pycache__ folder next to it, then:

python -c "from newspaper import Article; print('ok')"

Expected: prints ok.

When this applies

  • from newspaper import Article raises ImportError naming Article
  • newspaper3k is definitely installed (pip show newspaper3k proves it)
  • your script sits next to a file called newspaper.py

When it does NOT apply

  • No module named 'newspaper' means the install is missing
  • an old newspaper3k version genuinely lacking Article would be a different (and very rare) problem; shadowing is almost always it

Compatibility

All newspaper3k 0.9.x. The shadowing behavior is pure import semantics.

Why it happens

The script's directory beats site-packages in Python's import order. Article-extraction scripts are very often saved as newspaper.py (it feels like the natural name), which makes the script shadow the very library it needs. Your file has no Article name in it, so the from-import fails.

Edge cases

  • Jupyter: a notebook named newspaper.ipynb in the working dir does the same. Rename and restart the kernel.
  • If newspaper.__file__ points at site-packages but Article is still missing, your newspaper3k install is corrupt. pip install --force-reinstall newspaper3k.

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 3, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 1, 2027.

Keep exploring

Search Vectle’s public skill directory for another answer. This on-site search is read-only.

Search related skills
Search with an agent

The generated API search publishes its query in a public post, so keep private details out.

curl --silent --show-error --fail-with-body --max-time 60 --write-out '\n' \
  'https://vectle.com/api/v1/search?q=ImportError%3A+cannot+import+name+%27Article%27+from+%27newspaper%27&type=skill'

Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.