Skip to content

Incompatible OmnivoreQL (v0.3.4): unexpected keyword argument 'cursor' #4

@mgaitan

Description

@mgaitan

After Installed on python3.12 via uv and setting the token manually (see #3 ) I got this error.

tin@morocha:~/lab$ uv tool install omnivorex
warning: `uv tool install` is experimental and may change without warning.
Resolved 27 packages in 1.74s
Prepared 7 packages in 767ms
Installed 27 packages in 13ms
 + anyio==4.4.0
 + backoff==2.2.1
 + certifi==2024.7.4
 + charset-normalizer==3.3.2
 + gql==3.5.0
 + graphql-core==3.2.3
 + idna==3.7
 + importlib-metadata==8.0.0
 + linkify-it-py==2.0.3
 + markdown-it-py==3.0.0
 + mdit-py-plugins==0.4.1
 + mdurl==0.1.2
 + multidict==6.0.5
 + omnivoreql==0.3.4
 + omnivorex==0.0.15
 + pygments==2.18.0
 + python-dotenv==1.0.1
 + requests==2.32.3
 + requests-toolbelt==1.0.0
 + rich==13.7.1
 + sniffio==1.3.1
 + textual==0.29.0
 + typing-extensions==4.12.2
 + uc-micro-py==1.0.3
 + urllib3==2.2.2
 + yarl==1.9.4
 + zipp==3.19.2
Installed 1 executable: omnivorex
tin@morocha:$ omnivorex 
╭──────────────────────────────────────────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────────────────────────────────────────╮
│ /home/tin/.local/share/uv/tools/omnivorex/lib/python3.12/site-packages/omnivorex/omnivorex.py:95 in on_mount                                                                               │
│                                                                                                                                                                                            │
│    92 │   │   if not utils.is_logged_in():                                                     ╭────────────────────────── locals ───────────────────────────╮                             │
│    93 │   │   │   self.action_settings()                                                       │ self = OmnivoreX(title='OmnivoreX', classes={'-dark-mode'}) │                             │
│    94 │   │   else:                                                                            ╰─────────────────────────────────────────────────────────────╯                             │
│ ❱  95 │   │   │   self.action_refresh()                                                                                                                                                    │
│    96 │                                                                                                                                                                                    │
│    97 │   def on_button_pressed(self, event: Button.Pressed) -> None:                                                                                                                      │
│    98 │   │   if event.button.id == "load_more":                                                                                                                                           │
│                                                                                                                                                                                            │
│ /home/tin/.local/share/uv/tools/omnivorex/lib/python3.12/site-packages/omnivorex/omnivorex.py:111 in action_refresh                                                                        │
│                                                                                                                                                                                            │
│   108 │   def action_refresh(self) -> None:                                                    ╭────────────────────────── locals ───────────────────────────╮                             │
│   109 │   │   self.query_one("#list_view").clear()                                             │ self = OmnivoreX(title='OmnivoreX', classes={'-dark-mode'}) │                             │
│   110 │   │   self.MARKDOWN_VIEWER.document.update(self.WelcomePageMDContent)                  ╰─────────────────────────────────────────────────────────────╯                             │
│ ❱ 111 │   │   articles = utils.get_articles(limit=self.DEFAULT_LIMIT)                                                                                                                      │
│   112 │   │   self.populate_listview(articles)                                                                                                                                             │
│   113 │                                                                                                                                                                                    │
│   114 │   def action_archive(self) -> None:                                                                                                                                                │
│                                                                                                                                                                                            │
│ /home/tin/.local/share/uv/tools/omnivorex/lib/python3.12/site-packages/omnivorex/utils.py:44 in get_articles                                                                               │
│                                                                                                                                                                                            │
│   41                                                                                          ╭────── locals ───────╮                                                                      │
│   42                                                                                          │ cursor = 0          │                                                                      │
│   43 def get_articles(limit: int, cursor: int = 0, query="in:inbox"):                         │  limit = 42         │                                                                      │
│ ❱ 44 │   return get_client().get_articles(cursor=str(cursor), limit=limit, query=query)[      │  query = 'in:inbox' │                                                                      │
│   45 │   │   "search"                                                                         ╰─────────────────────╯                                                                      │
│   46 │   ]["edges"]                                                                                                                                                                        │
│   47                                                                                                                                                                                       │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: OmnivoreQL.get_articles() got an unexpected keyword argument 'cursor'

Dowgrading the lib did work

(omnivorex) tin@morocha:~/lab$ uv pip install "omnivoreql<0.3.4"
Resolved 15 packages in 1.62s
Prepared 1 package in 249ms
Uninstalled 1 package in 1ms
Installed 1 package in 1ms
 - omnivoreql==0.3.4
 + omnivoreql==0.3.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions