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

"Unknown or uninitialized column" warning #7

Closed
pmaier1971 opened this issue Dec 2, 2023 · 6 comments
Closed

"Unknown or uninitialized column" warning #7

pmaier1971 opened this issue Dec 2, 2023 · 6 comments

Comments

@pmaier1971
Copy link

Running into issues on a virtual Windows server with R (4.1.3). The atr package installs without issues, and authentication works fine. Retrieving skeets yields the expected results (e.g. your example feeds <- get_feeds_created_by(actor = "andrew.heiss.phd" works without errors).

But, I’m running into an issue when posting:

Error Message

Although the response claims that the message was posted, it never shows up on the feed.

If helpful, here’s the output from sessionInfo:

sessionInfo

@JBGruber
Copy link
Owner

JBGruber commented Dec 3, 2023

Not sure what could cause this. But you are using a pretty old version of httr2. Could you update the package (current version 1.0.0) and see if the error persists?

@pmaier1971
Copy link
Author

pmaier1971 commented Dec 4, 2023 via email

JBGruber added a commit that referenced this issue Dec 4, 2023
@JBGruber
Copy link
Owner

JBGruber commented Dec 4, 2023

What do you mean by:

It didn’t fix it, but the package now seems to work.

Sys.setenv(BSKY_TOKEN = "filename.rds”) can be used to manage identies, if you have several. I added an example to make it clearer.

The search endpoint did not work when we wrote the package (see #2), but it seems to be working now. You can use the unexported auto-generated function to use it now, or wait until we implement it:

res <- atr:::app_bsky_feed_search_posts("rstats", limit = 1L)
lobstr::tree(res)
#> <list>
#> ├─posts: <list>
#> │ └─<list>
#> │   ├─uri: "at://did:plc:kizxn77jkp4p5vqzapb..."
#> │   ├─cid: "bafyreifshqa44iqg5g6xl2j2clfaif7..."
#> │   ├─author: <list>
#> │   │ ├─did: "did:plc:kizxn77jkp4p5vqzapbedvg2"
#> │   │ ├─handle: "pmaier1971.bsky.social"
#> │   │ ├─displayName: "Philipp Maier"
#> │   │ ├─avatar: "https://cdn.bsky.app/img/avatar/..."
#> │   │ ├─viewer: <list>
#> │   │ │ ├─muted: FALSE
#> │   │ │ └─blockedBy: FALSE
#> │   │ └─labels: <list>
#> │   ├─record: <list>
#> │   │ ├─text: "Manufacturers' New Orders for Du..."
#> │   │ ├─$type: "app.bsky.feed.post"
#> │   │ ├─embed: <list>
#> │   │ │ ├─$type: "app.bsky.embed.images"
#> │   │ │ └─images: <list>
#> │   │ │   └─<list>
#> │   │ │     ├─alt: "US.Activity.ManufacturingOrdersD..."
#> │   │ │     └─image: <list>
#> │   │ │       ├─$type: "blob"
#> │   │ │       ├─ref: <list>
#> │   │ │       │ └─$link: "bafkreifg56uwi6qxh63mreusf2bbq63..."
#> │   │ │       ├─mimeType: "image/png"
#> │   │ │       └─size: 549452
#> │   │ ├─facets: <list>
#> │   │ └─createdAt: "2023-12-04T15:15:25.786920Z"
#> │   ├─embed: <list>
#> │   │ ├─$type: "app.bsky.embed.images#view"
#> │   │ └─images: <list>
#> │   │   └─<list>
#> │   │     ├─thumb: "https://cdn.bsky.app/img/feed_th..."
#> │   │     ├─fullsize: "https://cdn.bsky.app/img/feed_fu..."
#> │   │     └─alt: "US.Activity.ManufacturingOrdersD..."
#> │   ├─replyCount: 0
#> │   ├─repostCount: 0
#> │   ├─likeCount: 0
#> │   ├─indexedAt: "2023-12-04T15:15:25.786Z"
#> │   ├─viewer: <list>
#> │   └─labels: <list>
#> ├─cursor: "1"
#> └─hitsTotal: 1569

Created on 2023-12-04 with reprex v2.0.2

@JBGruber
Copy link
Owner

JBGruber commented Dec 4, 2023

I was too excited that search finally works and implemented it right away:

library(atr)
search_post("rstats", limit = Inf)
#> ℹ Found 1569 posts that fit the query
#> ⠙ Got 95 posts, but there is more.. [812ms]
#> ⠹ Got 194 posts, but there is more.. [1.3s]
#> ⠸ Got 291 posts, but there is more.. [1.7s]
#> ⠼ Got 378 posts, but there is more.. [2.3s]
#> ⠴ Got 465 posts, but there is more.. [2.6s]
#> ⠦ Got 562 posts, but there is more.. [3.2s]
#> ⠧ Got 658 posts, but there is more.. [3.6s]
#> ⠇ Got 753 posts, but there is more.. [4.1s]
#> ⠏ Got 845 posts, but there is more.. [4.7s]
#> ⠋ Got 939 posts, but there is more.. [5.2s]
#> ⠙ Got 1033 posts, but there is more.. [5.9s]
#> ⠹ Got 1132 posts, but there is more.. [6.5s]
#> ⠸ Got 1231 posts, but there is more.. [7.1s]
#> ⠼ Got 1331 posts, but there is more.. [7.8s]
#> ⠴ Got 1431 posts, but there is more.. [8.3s]
#> ℹ Parsing 1500 results.
#> ✔ Got 1500 results. All done!
#> 
#> # A tibble: 1,500 × 13
#>    uri     cid   created_at          author_handle author_name text  reply_count
#>    <chr>   <chr> <dttm>              <chr>         <chr>       <chr>       <int>
#>  1 at://d… bafy… 2023-12-04 15:15:25 pmaier1971.b… Philipp Ma… "Man…           0
#>  2 at://d… bafy… 2023-12-04 15:06:02 f2harrell.bs… Frank Harr… "New…           0
#>  3 at://d… bafy… 2023-12-04 14:19:00 jbgruber.bsk… Johannes B… "Are…           0
#>  4 at://d… bafy… 2023-12-04 14:08:32 bcrossman.bs… Brent Cros… "\n\…           0
#>  5 at://d… bafy… 2023-12-04 12:00:58 pmaier1971.b… Philipp Ma… "Bit…           0
#>  6 at://d… bafy… 2023-12-04 10:20:28 hrbrmstr.dev  hrbrmstr    "Day…           1
#>  7 at://d… bafy… 2023-12-04 08:56:53 steveharoz.c… Steve Haroz "#Rs…           0
#>  8 at://d… bafy… 2023-12-04 06:30:05 karawoo.bsky… Kara Woo    "Day…           0
#>  9 at://d… bafy… 2023-12-04 04:12:39 emitanaka.bs… Emi Tanaka  "My …           0
#> 10 at://d… bafy… 2023-12-03 16:40:47 bcrossman.bs… Brent Cros… "I j…           1
#> # ℹ 1,490 more rows
#> # ℹ 6 more variables: repost_count <int>, like_count <int>, indexed_at <dttm>,
#> #   author_data <list>, post_data <list>, embed_data <list>


search_post("rstats tiktok", limit = Inf)
#> ℹ Found 2 posts that fit the query
#> ℹ Parsing 2 results.
#> ✔ Got 2 results. All done!
#> 
#> # A tibble: 2 × 13
#>   uri      cid   created_at          author_handle author_name text  reply_count
#>   <chr>    <chr> <dttm>              <chr>         <chr>       <chr>       <int>
#> 1 at://di… bafy… 2023-12-04 14:19:00 jbgruber.bsk… Johannes B… "Are…           0
#> 2 at://di… bafy… 2023-11-07 08:03:23 jbgruber.bsk… Johannes B… "I n…           1
#> # ℹ 6 more variables: repost_count <int>, like_count <int>, indexed_at <dttm>,
#> #   author_data <list>, post_data <list>, embed_data <list>

Created on 2023-12-04 with reprex v2.0.2

@pmaier1971
Copy link
Author

pmaier1971 commented Dec 4, 2023 via email

@JBGruber
Copy link
Owner

Hey @pmaier1971 , is the problem resolved? If so, could you please close the issue?

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

2 participants