-
-
Notifications
You must be signed in to change notification settings - Fork 142
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
Crashing when updating list of addins #124
Comments
@jeam-github the file path is created by the {rappdirs} package directly as you can see here. Can you try running |
rappdirs::user_data_dir("addinsrepo", "daattali")
[1] "~/Library/Application Support/addinsrepo"
rappdirs::user_data_dir("test")
[1] "~/Library/Application Support/test"
It certainly returns "~"
… On 31/03/2021, at 7:49 PM, Dean Attali ***@***.***> wrote:
rappdirs::user_data_dir("addinsrepo", "daattali")
|
What version of mac do you have? I'm surprised at this inconsistency, reported it to {rappdirs} r-lib/rappdirs#37 Does it seem like pandoc is failing to read the file because of "~"? If you manually run |
Version of Mac:
Hardware Overview:
Model Name: iMac
Model Identifier: iMac15,1
Processor Name: Quad-Core Intel Core i5
Processor Speed: 3.5 GHz
Number of Processors: 1
Total Number of Cores: 4
L2 Cache (per Core): 256 KB
L3 Cache: 6 MB
Memory: 16 GB
Boot ROM Version: 235.0.0.0.0
SMC Version (system): 2.22f16
Serial Number (system): C02NP3CDFY14
Hardware UUID: AFEAE160-1045-5C0B-8A83-96B6836553FE
System Software Overview:
System Version: macOS 10.15.7 (19H15)
Kernel Version: Darwin 19.6.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Computer Name: Jim’s iMac
Username: Jim McIntosh (jim)
Secure Virtual Memory: Enabled
System Integrity Protection: Enabled
Time since boot: 8 days 22:08
On 1/04/2021, at 4:45 AM, Dean Attali ***@***.***> wrote:
Does it seem like pandoc is failing to read the file because of "~"? If you manually run rmarkdown::pandoc_convert("/Users/jim/Library/Application Support/addinsrepo/addins.md", to = "html") does that work?
Yes, it produces HTML code that saved as file code.html displays perfectly in Safari.
But running rmarkdown::pandoc_convert("~/Library/Application Support/addinsrepo/addins.md", to = "html") fails?
Yes, it fails:
rmarkdown::pandoc_convert("~/Library/Application Support/addinsrepo/addins.md", to = "html")
pandoc: ~/Library/Application Support/addinsrepo/addins.md: openBinaryFile: does not exist (No such file or directory)
Error: pandoc document conversion failed with error 1
Can you confirm the output of path.expand("~")?
path.expand("~")
[1] "/Users/jim"
|
Interesting. This seems like a bug in rmarkdown::pandoc_convert. Can you please help me with the following so that I can open an accurate bug report on {rmarkdown}:
Thanks! |
See below (apart from creation of the test file, all done in RStudio):
On 1/04/2021, at 8:45 AM, Dean Attali ***@***.***> wrote:
Interesting. This seems like a bug in rmarkdown::pandoc_convert. Can you please help me with the following so that I can open an accurate bug report on {rmarkdown}:
Confirm that path.expand("~") == "/Users/jim"
path.expand("~")
[1] "/Users/jim"
Create a file at "~/test.md" that contains the text # test
Created file:
/Users/jim/test.md
Confirm that rmarkdown::pandoc_convert("/Users/jim/test.md", to = "html") works
rmarkdown::pandoc_convert("/Users/jim/test.md", to = "html")
<h1 id="test">test</h1>
Confirm that rmarkdown::pandoc_convert("~/test.md", to = "html") results in an error (please copy the error)
No error!!!
rmarkdown::pandoc_convert("~/test.md", to = "html")
<h1 id="test">test</h1>
What is going on? What am I doing that is causing this problem?
… Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#124 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ARDOYMYROWRYBBUY6WNHN4LTGN3XHANCNFSM42D3OITA>.
|
Can you see whether the addins.md file that the original error complained about exists? If so, try runing the pandoc_convert function on that file, both using the expanded path and using the ~ path. This will help narrow down where the problem is. |
See below:
On 1/04/2021, at 10:09 AM, Dean Attali ***@***.***> wrote:
Can you see whether the addins.md file that the original error complained about exists?
I have just run it again, got the error, and yes, the addins.md file exists:
/Users/jim/Library/Application Support/addinsrepo/addins.md
If so, try runing the pandoc_convert function on that file, both using the expanded path and using the ~ path. This will help narrow down where the problem is.
rmarkdown::pandoc_convert("/Users/jim/Library/Application Support/addinsrepo/addins.md", to = "html")
<h2 id="addinslist-table">
List of addins
</h2>
<p>If you made a useful RStudio addin, feel free to make a pull request <a href="https://github.com/daattali/addinslist#readme">on GitHub</a> to add it to the list.</p>
<table>
.
.
. etc
Which worked. Alternatively
rmarkdown::pandoc_convert("~/Library/Application Support/addinsrepo/addins.md", to = "html")
pandoc: ~/Library/Application Support/addinsrepo/addins.md: openBinaryFile: does not exist (No such file or directory)
Error: pandoc document conversion failed with error 1
Which gave the error.
… —
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#124 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ARDOYM2GIAVLP2DBYLZNA3LTGOFSNANCNFSM42D3OITA>.
|
OK, I cannot reproduce this behaviour so you'll need to do some troubleshooting on your own and submit a bug report to {rmarkdown}. You've verified that (a) the file But it would be more useful if you can track it down some more. For example, we've already tried backtracking a few steps and we saw that the problem does not happen when you create a file at Please link to this issue in the rmarkdown issue you open so that we'll know when it's addressed! |
It seems odd that the problem could be associated with the space in folder name "Application Support" because this is an Apple folder name which everyone else, for which addinslist works fine, will have on their machines. However, I tried the following:
The following works OK with the test.md file in a folder with a space in the name and the full path:
rmarkdown::pandoc_convert("/Users/jim/test folder/test.md", to = "html")
<h1 id="test">test</h1>
while this does not:
rmarkdown::pandoc_convert("~/test folder/test.md", to = "html")
pandoc: ~/test folder/test.md: openBinaryFile: does not exist (No such file or directory)
Error: pandoc document conversion failed with error 1
However, following your suggestion with the space left out of the folder name, this does work
rmarkdown::pandoc_convert("~/testfolder/test.md", to = "html")
<h1 id="test">test</h1>
I'm not sure what else to try - this seems to suggest it is the space in a folder name causing the problem, at least on my machine. But, as I said at the beginning, how can this be when everyone else running addinslist will also have a space in their "Application Support" folder name?
I'm not sure how to submit the evidence, and how much of it, as well as background info about addinslist, to {rmarkdown}?
… On 1/04/2021, at 4:18 PM, Dean Attali ***@***.***> wrote:
OK, I cannot reproduce this behaviour so you'll need to do some troubleshooting on your own and submit a bug report to {rmarkdown}.
You've verified that (a) the file /Users/jim/Library/Application Support/addinsrepo/addins.md exists, (b) pandoc_convert on that file works, (c) pandoc_convert on the same file but with ~ doesn't work. That alone can be used to open an issue in their repo.
But it would be more useful if you can track it down some more. For example, we've already tried backtracking a few steps and we saw that the problem does not happen when you create a file at /Users/jim/test.md. So you should try creating another file /Users/jim/Library/Application Support/addinsrepo/test.md and see if that also fails with . If so, then try creating a file under /Users/jim/Library/Application Support/test.md and under /Users/jim/Library/test.md to see if one of those break. Maybe the issue is when there is tilde () expansion combined with a folder name that contains a space in it for example? It's very difficult for me to try to debug this without access to your machine but this is the sort of steps I would take.
Please link to this issue in the rmarkdown issue you open so that we'll know when it's addressed!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#124 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ARDOYM6RIQLFRUY53E33JMTTGPQYLANCNFSM42D3OITA>.
|
And this also works, if I create a fake folder in Library folder and put the test file.md in that:
rmarkdown::pandoc_convert("~/Library/ApplicationSupport/addinsrepo/test.md", to = "html")
<h1 id="test">test</h1>
whereas this, with the space, does not
rmarkdown::pandoc_convert("~/Library/Application Support/addinsrepo/test.md", to = "html")
pandoc: ~/Library/Application Support/addinsrepo/test.md: openBinaryFile: does not exist (No such file or directory)
Error: pandoc document conversion failed with error 1
Pretty convincing...
________________________________________-
It seems odd that the problem could be associated with the space in folder name "Application Support" because this is an Apple folder name which everyone else, for which addinslist works fine, will have on their machines. However, I tried the following:
The following works OK with the test.md file in a folder with a space in the name and the full path:
rmarkdown::pandoc_convert("/Users/jim/test folder/test.md", to = "html")
<h1 id="test">test</h1>
while this does not:
rmarkdown::pandoc_convert("~/test folder/test.md", to = "html")
pandoc: ~/test folder/test.md: openBinaryFile: does not exist (No such file or directory)
Error: pandoc document conversion failed with error 1
However, following your suggestion with the space left out of the folder name, this does work
rmarkdown::pandoc_convert("~/testfolder/test.md", to = "html")
<h1 id="test">test</h1>
I'm not sure what else to try - this seems to suggest it is the space in a folder name causing the problem, at least on my machine. But, as I said at the beginning, how can this be when everyone else running addinslist will also have a space in their "Application Support" folder name?
I'm not sure how to submit the evidence, and how much of it, as well as background info about addinslist, to {rmarkdown}?
… On 1/04/2021, at 4:18 PM, Dean Attali ***@***.*** ***@***.***>> wrote:
OK, I cannot reproduce this behaviour so you'll need to do some troubleshooting on your own and submit a bug report to {rmarkdown}.
You've verified that (a) the file /Users/jim/Library/Application Support/addinsrepo/addins.md exists, (b) pandoc_convert on that file works, (c) pandoc_convert on the same file but with ~ doesn't work. That alone can be used to open an issue in their repo.
But it would be more useful if you can track it down some more. For example, we've already tried backtracking a few steps and we saw that the problem does not happen when you create a file at /Users/jim/test.md. So you should try creating another file /Users/jim/Library/Application Support/addinsrepo/test.md and see if that also fails with . If so, then try creating a file under /Users/jim/Library/Application Support/test.md and under /Users/jim/Library/test.md to see if one of those break. Maybe the issue is when there is tilde () expansion combined with a folder name that contains a space in it for example? It's very difficult for me to try to debug this without access to your machine but this is the sort of steps I would take.
Please link to this issue in the rmarkdown issue you open so that we'll know when it's addressed!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#124 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ARDOYM6RIQLFRUY53E33JMTTGPQYLANCNFSM42D3OITA>.
|
Reported to rstudio/rmarkdown#2089 |
@jeam-github I applied a fix. Since I wasn't able to reproduce the issue, I cannot test if it works or not. Can you please re install this package from github ( |
Yes, thanks, it works now. What was the problem?
… On 2/04/2021, at 5:03 AM, Dean Attali ***@***.***> wrote:
remotes::install_github("daattali/addinslist")
|
The issue that we discovered, the one that I reported to rmarkdown. |
OK, I see - thanks.
… On 2/04/2021, at 9:21 AM, Dean Attali ***@***.***> wrote:
The issue that we discovered, the one that I reported to rmarkdown.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#124 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ARDOYM7AMFC5FFVKPMXJHA3TGTIWDANCNFSM42D3OITA>.
|
Hi, I am also experiencing same error on MacOS Catalina. > addinslist:::addinslistAddin()
Listening on http://127.0.0.1:5873
pandoc: ~/Library/Application Support/addinsrepo/addins.md: openBinaryFile: does not exist (No such file or directory)
Warning: Error in : pandoc document conversion failed with error 1
57: stop
56: rmarkdown::pandoc_convert
55: update_addins_file
54: update_addins_list
53: update_addins_list_values
52: refresh_list
51: <Anonymous>
49: server
Error : pandoc document conversion failed with error 1 |
did you install the latest version of addinslist from github? |
Hi, after restarting RStudio it worked. Thank you. |
Had the same issye as sbalc. Installing the lastest version of addinlist from github also worked. Thanks!! |
Same problem here using the version on CRAN. |
I'll update the package on CRAN today so that this fix will be around for everyone |
Reported by @jeam-github in #123
The text was updated successfully, but these errors were encountered: