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

twarc2 timelines command throws exception on nonexistent users #633

Open
lxcode opened this issue Apr 29, 2022 · 0 comments
Open

twarc2 timelines command throws exception on nonexistent users #633

lxcode opened this issue Apr 29, 2022 · 0 comments

Comments

@lxcode
Copy link

lxcode commented Apr 29, 2022

The timelines command appears to fail on the first username in a file that doesn't resolve — the regular timeline command in a for loop works fine, and that command gracefully just prints "⚡ No such user someuser".


 0%|                                  | Processed 98/61295 lines of input file [00:44<7:39:06,  2.22it/s]
Traceback (most recent call last):
  File "/opt/homebrew/bin/twarc2", line 8, in <module>
    sys.exit(twarc2())
  File "/opt/homebrew/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/opt/homebrew/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/opt/homebrew/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/homebrew/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/homebrew/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/opt/homebrew/lib/python3.9/site-packages/click/decorators.py", line 38, in new_func
    return f(get_current_context().obj, *args, **kwargs)
  File "/opt/homebrew/lib/python3.9/site-packages/twarc/command2.py", line 1489, in timelines
    tweets = _timeline_tweets(
  File "/opt/homebrew/lib/python3.9/site-packages/twarc/command2.py", line 1536, in _timeline_tweets
    tweets = T.timeline(
  File "/opt/homebrew/lib/python3.9/site-packages/twarc/client2.py", line 1290, in timeline
    user_id = self._ensure_user_id(user)
  File "/opt/homebrew/lib/python3.9/site-packages/twarc/client2.py", line 1874, in _ensure_user_id
    raise ValueError(f"No such user {user}")
ValueError: No such user LuXValVal1```
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

1 participant