1

I got the following error:

Error in assign(name, value, envir = attr(static, ".env")) : use of NULL environment is defunct

while running such code

location<-strona %>%
html_nodes(".text-nowrap.hidden-xs") %>%
html_text()

Do you have understanding how fix this error, so that environment is not NULL environment anymore?

M_D
  • 287
  • 3
  • 13

1 Answers1

1

I have a similar problem that has just started to appear on several r scripts that parse websites. There was an update to the package 'selectr' recently. I reverted back to version 0.3-2 of selectr and the problem disappeared.

jg77
  • 11
  • 3
  • What I observed is that my code run successfully with every first run in given session. Once I would like to execute the code again, error pops up. – M_D Apr 04 '18 at 09:53
  • what version of selectr are you using? I checked my code again with selectr version 0.4 and the error message happens at different points in the code. – jg77 Apr 04 '18 at 10:40
  • It does not have to be associated with selectr, in my code I am using multiple packages, namely: `"rvest", "stringr", "tidyr", "XML", "xml2", "foreach", "rJava", "xlsx", "httr", "devtools", "rpremraj/mailR", "RSelenium", "caTools"`. I suspect that `rvest` or `stringr` are causing the error, but I am not sure. – M_D Apr 04 '18 at 10:55
  • my code was only using rvest. rvest also loads stringr. A new version of stringr was released a few days ago. Since the update my code had issues. Try downgrading to version 0.3-2 and see if the problem is still there – jg77 Apr 04 '18 at 10:59
  • Most likely it will work, but it was important for me during development. Since code is ready, I run it as self executible file (like .exe file), so it does not bother me anymore – M_D Apr 04 '18 at 15:29