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

Error: Problems parsing JSON #77

Closed
maelle opened this issue Sep 28, 2018 · 7 comments
Closed

Error: Problems parsing JSON #77

maelle opened this issue Sep 28, 2018 · 7 comments

Comments

@maelle
Copy link
Member

maelle commented Sep 28, 2018

reprex::reprex(plot(1:10),
               outfile = "myreprex")
#> Preparing reprex as .R file:
#>   * myreprex_reprex.R
#> Rendering reprex...
#> Writing reprex markdown:
#>   * myreprex_reprex.md
#> Rendered reprex is on the clipboard.

suppfiles <- fs::dir_ls("myreprex_reprex_files", 
                        recursive = TRUE)
suppfiles <- suppfiles[fs::is_file(suppfiles)]
files <- c("myreprex_reprex.md", 
           suppfiles,
           "myreprex_reprex.R")
gistr::gist_create(files = files,
                   description = "my reprex")
#> Error: Problems parsing JSON

Created on 2018-09-28 by the reprex package (v0.2.1)

@maelle
Copy link
Member Author

maelle commented Sep 28, 2018

@cderv this was my experimenting with the same idea as yours 😉 tidyverse/reprex#190

@sckott
Copy link
Contributor

sckott commented Sep 28, 2018

forgot we've dealt with this before , see

cant upload binary files with the http api, so got to use git flow instead

see if this example works https://github.com/ropensci/gistr/blob/master/R/gist_create_git.R#L79-L85

@maelle
Copy link
Member Author

maelle commented Sep 28, 2018

Thanks. Now I get a git2r error for a change, with the CRAN version, so I'll need to install a dev version probably.

reprex::reprex(plot(1:10),
               outfile = "myreprex")
#> Preparing reprex as .R file:
#>   * myreprex_reprex.R
#> Rendering reprex...
#> Writing reprex markdown:
#>   * myreprex_reprex.md
#> Rendered reprex is on the clipboard.

suppfiles <- fs::dir_ls("myreprex_reprex_files", 
                        recursive = TRUE)
suppfiles <- suppfiles[fs::is_file(suppfiles)]
fs::file_move(suppfiles, getwd())
files <- c("myreprex_reprex.md", 
           fs::path_file(suppfiles),
           "myreprex_reprex.R")
gistr::gist_create_git(files = files,
                   description = "my reprex")
#> Error in sprintf("%s/?|\\./", git@path): trying to get slot "path" from an object (class "git_repository") that is not an S4 object

Created on 2018-09-28 by the reprex package (v0.2.1)

@sckott
Copy link
Contributor

sckott commented Sep 28, 2018

FWIW i have the CRAN version of git2r

@maelle
Copy link
Member Author

maelle commented Sep 28, 2018

But you don't use Windows 😉 I'm installing the dev version, I might report the bug over there if I still get the error.

@sckott
Copy link
Contributor

sckott commented Sep 28, 2018

ok, thanks

@maelle
Copy link
Member Author

maelle commented Sep 28, 2018

My problems are now linked to git2r/ssh/Windows as usual, not to gistr, so closing this. Thank you!

@maelle maelle closed this as completed Sep 28, 2018
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