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

Failure to get community on lemmy version 19.5 #39

Closed
eerongal opened this issue Jul 1, 2024 · 0 comments
Closed

Failure to get community on lemmy version 19.5 #39

eerongal opened this issue Jul 1, 2024 · 0 comments
Assignees

Comments

@eerongal
Copy link

eerongal commented Jul 1, 2024

Running a small bot with this library, and the most recent update to 19.5 broke the GetCommunityResponse call

api_response = lemmy.get_community(name=comm_name)
response = GetCommunityResponse(api_response)

fails with:

Traceback (most recent call last):
  File "C:\Users\ericn\PycharmProjects\rssLemmyBot\main.py", line 106, in <module>
    post(entries, lemmy, con)
  File "C:\Users\ericn\PycharmProjects\rssLemmyBot\main.py", line 35, in post
    response = GetCommunityResponse(api_response)
  File "C:\Users\ericn\PycharmProjects\rssLemmyBot\venv\lib\site-packages\plemmy\responses.py", line 175, in __init__
    self.community_view = CommunityView(response["community_view"])
  File "C:\Users\ericn\PycharmProjects\rssLemmyBot\venv\lib\site-packages\plemmy\views.py", line 18, in __init__
    self.parse()
  File "C:\Users\ericn\PycharmProjects\rssLemmyBot\venv\lib\site-packages\plemmy\views.py", line 167, in parse
    self.community = Community(**self._view["community"])
TypeError: Community.__init__() got an unexpected keyword argument 'visibility'

Process finished with exit code 1

It looks like new fields were added to the lemmy API. Not sure if this extends beyond just the community call, its the first one i ran into.

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

3 participants