quarto-ext / manuscript-template-rstudio

https://quarto-ext.github.io/manuscript-template-rstudio/
18 stars 11 forks source link

Quarto render with jats set to default issue #3

Closed NgChongKai closed 3 weeks ago

NgChongKai commented 4 weeks ago

Hi I was trying to quarto render with jats set to default. However I got this error. My pdf, word and html file managed to get rendered though. Please let me know how else I can provide information. Thank you!


Creating MECA Bundle
  40 article files
  196 source files
  2 notebooks
  3 other files

ERROR: An error occurred while attempting to generate MECA archive.
Compress-Archive : A positional parameter cannot be found that
accepts argument 'System.Object[]'.
At line:1 char:1
+ Compress-Archive -Path manifest.xml, index.xml, index.pdf,
index.docx ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Compress-Arc
   hive], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Compre
   ss-Archive

Stack trace:
Compress-Archive : A positional parameter cannot be found that
accepts argument 'System.Object[]'.
At line:1 char:1
+ Compress-Archive -Path manifest.xml, index.xml, index.pdf,
index.docx ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Compress-Arc
   hive], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Compre
   ss-Archive

    at createMecaBundle (file:///C:/Users/chong/AppData/Local/Programs/Quarto/bin/quarto.js:94859:19)
    at eventLoopTick (ext:core/01_core.js:153:7)
    at async Object.postRender (file:///C:/Users/chong/AppData/Local/Programs/Quarto/bin/quarto.js:95624:32)
    at async renderProject (file:///C:/Users/chong/AppData/Local/Programs/Quarto/bin/quarto.js:78699:13)
    at async Command.actionHandler (file:///C:/Users/chong/AppData/Local/Programs/Quarto/bin/quarto.js:83077:32)
    at async Command.execute (file:///C:/Users/chong/AppData/Local/Programs/Quarto/bin/quarto.js:8017:13)
    at async Command.parseCommand (file:///C:/Users/chong/AppData/Local/Programs/Quarto/bin/quarto.js:7907:20)
    at async quarto (file:///C:/Users/chong/AppData/Local/Programs/Quarto/bin/quarto.js:118224:9)
    at async file:///C:/Users/chong/AppData/Local/Programs/Quarto/bin/quarto.js:118244:9
    at async mainRunner (file:///C:/Users/chong/AppData/Local/Programs/Quarto/bin/quarto.js:118128:9)
cderv commented 3 weeks ago

Thanks. I reformated your code source to make it readable.

Can you share more information on the project ? Even better, can you share a reproducible example ?

(if this is not with this template - if this is then ignore. I just want to be sure)

Also could you share you powershell version ? We are internally PowerShell Compress-Archive and want to check it is not linked to version of Powershell.

It seems more related to quoting to me, but I am surprised that this issue would only be found now, and not by our tests on windows.

cderv commented 3 weeks ago

Right now I did the following

It create the zip without issue.

$ powershell -Command "(Get-Host).Version"

Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      22621  3958

But you may work with another project as I get this

Creating MECA Bundle
  14 article files
  51 source files
  2 notebooks
  3 other files

and you have more. I am still thinking this is a quoting issue.

Do you have a file with a special character in name, or something else ? Anything you see that could cause powershell to trip on the name (like a space in filename ?)

cderv commented 3 weeks ago

I could reproduce by adding a file with space in name. We'll fix this.