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

hypexport returns global info only #7

Closed
hwiorn opened this issue Feb 26, 2022 · 4 comments
Closed

hypexport returns global info only #7

hwiorn opened this issue Feb 26, 2022 · 4 comments

Comments

@hwiorn
Copy link

hwiorn commented Feb 26, 2022

I simply tested it like this.

python3 -m hypexport.export --username "SOME_ID" --token "SOME_TOKEN" > hypothesis.json
{
  "annotations": [],
  "profile": {
    "authority": "hypothes.is",
    "features": {
      "client_display_names": false,
      "embed_cachebuster": false,
      "notebook_launch": true
    },
    "groups": [
      {
        "id": "__world__",
        "name": "Public",
        "public": true
      },
      {
        "id": "OMITTED",
        "name": "Audio signal analysis",
        "public": false,
        "url": "https://hypothes.is/groups/OMITTED/audio-signal-analysis"
      },
      {
        "id": "OMITTED",
        "name": "Data science",
        "public": false,
        "url": "https://hypothes.is/groups/OMITTED/data-science"
      },
      {
        "id": "OMITTED",
        "name": "General",
        "public": false,
        "url": "https://hypothes.is/groups/OMITTED/general"
      }
    ],
    "preferences": {},
    "user_info": {
      "display_name": null
    },
    "userid": "acct:OMITTED@hypothes.is"
  }
}                         

This output differs from annotation.json of HPI demo.

I saw your comment.
Is the hypothesis annotation structure changed?
Or do I have to change some settings in hypothesis?

@hwiorn
Copy link
Author

hwiorn commented Feb 28, 2022

I got it.
The username does not mean login(account) ID.
The hypexport uses the username as a search filter.

annotations = list(self.api.search_all({'user': self.user}))

So It need to be acct:OMITTED@hypothes.is or OMITTED@hypothes.is not "SOME_ID".

@hwiorn hwiorn closed this as completed Feb 28, 2022
@karlicoss
Copy link
Owner

Hi! Glad you've figured this out, but not sure I understand -- what did you pass to --username instead of the username?

In my hypexport job, I'm just passing --username karlicoss and it seems to work, no need for karlicoss@hypothes.is

@hwiorn
Copy link
Author

hwiorn commented Mar 5, 2022

@karlicoss I used my email account. Hypothes.is accepts both email account and username. So I thought --username and --token are authentication options. Hypothes.is handles a username as username@hypothes.is in their API. So it also works without @hypothes.is.

@Stvad
Copy link

Stvad commented Nov 30, 2022

Had the same issue! was passing the email and it returns global info, but not the annotations.

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