-
Notifications
You must be signed in to change notification settings - Fork 2
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
lexical error: invalid char in json text #11
Comments
Thanks for the post @superboreen . Can you run the code again and give the trace of the error, so i can see exactly where it occurs. |
Not sure how I do that. Can you advise. |
Actually I realise the error I posted above is a bit misleading. When I get the error in the RStudio console, the (right here) ------^ arrow is actually pointing at the forward slash. Maybe it is a path thing? |
here's a chapter on debugging including tracebacks |
Ok thanks, I will study that when I have a little time. FWIW for now, I manged to fumble into debug somehow and it would appears that it is the following line that is throwing the error: list_current_prefs <- jsonlite::fromJSON(rstudio_config_path("rstudio-prefs.json")) |
can you confirm that the path exists |
It does. { |
Why is some text present with strike through? This is meant to be a plain text file |
Don't know. Github did that when I pasted. No strikethrough in the original. |
thanks for the clarification. if you try to read this JSON file on your machine (outside of the package), do you still get the error? |
Not if I use the lower case filename. See below.
|
Thank you again @superboreen for reporting the issue. I'm not a Linux user and I think it's due to the case sensitivity of the Linux file system. Can you please report here how the following files appear on your machine (with correct capitalization), and I'll update the files specifications in the package.
|
They are all lowercase as you show above addins.json |
hey hey @superboreen ! I wanted to update you....I don't have a linux machine to test on, unfortunately, and I also don't have time to continue debugging. I am planning an update that should bypass this issue in the next couple of months FYI. Sorry I can't solve it immediately |
No problem. Thanks for the update. I will keep an eye out for developments. Best of luck. |
Hi, just to let you know, I had the same issue on my Linux machine and it was caused by the fact that
in |
Thank you @jetroant and @superboreen for the reports! FYI, I wrote this for my team and we're all on Windows. I don't have the bandwidth at the moment or access to a Linux machine to make updates. Happy to review a Pull Request if you have a chance to create one though. |
@superboreen @jetroant I've finally gotten around to making this change. The update is in this pull request branch (#16). If you have a chance, it would be fantastic, if you can let me know if your issues are resolved. |
UDPATE: @jetroant @superboreen the pull request has been merged, and is now in the main branch of the repo. But please do take a look when you have a moment and let me know. |
When I run the example I get this error. Any advice appreciated.
Error: lexical error: invalid char in json text.
~/.config/RStudio/rstudio-prefs
(right here) ------^
Am on Ubuntu 20.04.3 LTS, RStudio 2021.09.0 Build 351, R version 4.1.2 (2021-11-01)
The text was updated successfully, but these errors were encountered: