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

parse error by packrat #285

Closed
renejuan opened this issue Mar 25, 2016 · 6 comments
Closed

parse error by packrat #285

renejuan opened this issue Mar 25, 2016 · 6 comments

Comments

@renejuan
Copy link

This is more a recommendation; while parsing packrat will throw an error that looks like:

Failed to parse dependencies in this file will not be discovered

It may be a good idea to suggest the person to look at such script; as there may be a syntax error (e.g., open parentheses) that is causing such error.

@kevinushey
Copy link
Contributor

I think the Failed to parse line should help imply this (ie, we couldn't parse this because there's a parse error). Of course, it would be great if packrat could report this more properly.

@shrektan
Copy link

I create a project on OSX and everything is fine. Now I'm on windows and packrat::status says the warnings... It's really weird and everything works fine, too. I doubt it might due to the line ending conversion?

@shrektan
Copy link

I get it. If my file contains UTF-8 characters, the warning will show up...

@kevinushey
Copy link
Contributor

What version of packrat are you using? We recently fixed up some UTF-8 related issues seen on Windows; can you ensure that you have the latest CRAN version?

@shrektan
Copy link

@kevinushey It's the lastest version of packrat on CRAN, which is 0.4.8.1. And I'm pretty sure it's caused by the UTF-8 chars in the script, since there's no warning after removing those characters.

Below is my session info, if it helps. If there's anything more that can help you identify the problem, please tell me how to do it. I would be glad to provide, thanks.

errors

packrat::status()
Up to date.
Warning messages:
1: In value[[3L]](cond) :
  Failed to parse D:/RWD/HR-Eval/global.R ; dependencies in this file will not be discovered.
2: In value[[3L]](cond) :
  Failed to parse D:/RWD/HR-Eval/modules/about.R ; dependencies in this file will not be discovered.
3: In value[[3L]](cond) :
  Failed to parse D:/RWD/HR-Eval/modules/login.R ; dependencies in this file will not be discovered.
4: In value[[3L]](cond) :
  Failed to parse D:/RWD/HR-Eval/modules/user.R ; dependencies in this file will not be discovered.

sessionInfo

> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=Chinese (Simplified)_People's Republic of China.936 
[2] LC_CTYPE=Chinese (Simplified)_People's Republic of China.936   
[3] LC_MONETARY=Chinese (Simplified)_People's Republic of China.936
[4] LC_NUMERIC=C                                                   
[5] LC_TIME=Chinese (Simplified)_People's Republic of China.936    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] tools_3.3.1     packrat_0.4.8-1

one of the warned script (about.R)

output$about <- renderUI({
  div(
    style = "display:block;text-align:center;width:100%;",
    div(
      class = paste0("panel panel-", "default"),
      style = "display:inline-block;width:95%;max-width:450px;text-align:center;",
      div(
        class = "panel-body", 
        style = "display:inline-block;width:95%;max-width:450px;text-align:left;",
        tags$p("版本信息: 0.0.0.9000"),
        tags$p("作者:", tags$a("谭伯虎", href = "mailto:shrektan@126.com"))
      )
    )
  )
})

@aronatkins
Copy link
Contributor

We believe that this is resolved with #647. Please re-open this issue if you are still encountering problems.

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

4 participants