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

Package Errors #35

Open
speenoo opened this issue Mar 5, 2023 · 3 comments
Open

Package Errors #35

speenoo opened this issue Mar 5, 2023 · 3 comments

Comments

@speenoo
Copy link

speenoo commented Mar 5, 2023

error

Hey yall, I properly imported the packages, but for some reason I keep getting the following errors. Any suggestions?

Im running the following code:

from pygooglenews import GoogleNews
import json
import time

gn = GoogleNews()
top = gn.top_news()

entries = top["entries"]
count = 0
for entry in entries:
  count = count + 1
  print(
    str(count) + ". " + entry["title"] + entry["published"]
  )
  time.sleep(0.25)
@Optega
Copy link

Optega commented Mar 15, 2023

I just installed the feedparser package (pip3 install feedparser --upgrade) and it worked, but it gave the following message after installation:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behavior is the source of the following dependency conflicts.
pygooglenews 0.1.2 requires feedparser<6.0.0,>=5.2.1, but you have feedparser 6.0.10 which is incompatible.

So use your discretion, pygooglenews works after that anyway

@JackDance
Copy link

I attempted the following steps and succeeded.

  1. install specified version of setuptools
    pip install setuptools==57.5.0
  2. install pygooglenews
    pip install pygooglenews

@thegausiantheory
Copy link

I am using Poetry as my Environment manager, so when I do this..

(news-test-project-py3.11) PS C:\Users\rezam\codespace\news-test-project> poetry add pygooglenews 
Using version ^0.1.2 for pygooglenews

Updating dependencies
Resolving dependencies...

Writing lock file

Package operations: 9 installs, 0 updates, 0 removals

  • Installing tzdata (2023.3)
  • Installing pytz (2023.3.post1)
  • Installing regex (2023.10.3)
  • Installing soupsieve (2.5)
  • Installing tzlocal (5.1)
  • Installing beautifulsoup4 (4.12.2)
  • Installing dateparser (0.7.6)
  • Installing feedparser (5.2.1)

  ChefBuildError

  Backend subprocess exited when trying to invoke get_requires_for_build_wheel

  error in feedparser setup command: use_2to3 is invalid.


  at ~\.local\pipx\venvs\poetry\Lib\site-packages\poetry\installation\chef.py:152 in _prepare
      148│
      149│                 error = ChefBuildError("\n\n".join(message_parts))
      150│
      151│             if error is not None:
    → 152│                 raise error from None
      153│
      154│             return path
      155│
      156│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with feedparser (5.2.1) not supporting PEP 517 builds. You can verify this by running 'pip wheel --use-pep517 "feedparser (==5.2.1)"'.

Finally I tried @JackDance 's solution and that works. But it would be nice to have the updated version of setuptools and feedparser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants