Closed blset closed 3 years ago
Yes I will need the script to debug. Ideally if you could reduce it to something that still causes the error but does not contain proprietary data, and post that, would be the best for future reproducibility. You can sequentially delete half of the script (and then half of the remainder) to do a binary search for the problem code.
One question: are you using special UTF-8 characters?
Also, please post sessionInfo()
output.
here is the fragment
path = file.path("data-raw", "2017","chains") chain <- foreach( el = iter(df, by = "row"), .errorhandling = "pass" ) %do% { init <- new( el$class # prefix ) }
also attached as a txt
R version 3.5.0 (2018-04-23)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: OS X El Capitan 10.11.6
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
locale:
[1] fr_FR.UTF-8/fr_FR.UTF-8/fr_FR.UTF-8/C/fr_FR.UTF-8/fr_FR.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] roci_0.2.1 glue_1.3.0 unitizer_1.4.5 foreach_1.4.4 rlist_0.4.6.1
[6] RPostgreSQL_0.6-2 DBI_1.0.0 magrittr_1.5 data.table_1.11.4 itertools_0.1-3
[11] iterators_1.0.9
loaded via a namespace (and not attached):
[1] Rcpp_0.12.18 compiler_3.5.0 ensurer_1.1 tools_3.5.0 testthat_2.0.0
[6] digest_0.6.15 packrat_0.4.9-3 jsonlite_1.5 memoise_1.1.0 lattice_0.20-35
[11] rlang_0.2.1 Matrix_1.2-14 rstudioapi_0.7 diffobj_0.1.11 commonmark_1.5
[16] yaml_2.1.19 parallel_3.5.0 luzlogr_0.2.0 withr_2.1.2 stringr_1.3.1
[21] roxygen2_6.1.0 xml2_1.2.0 desc_1.2.0 devtools_1.13.6 rprojroot_1.3-2
[26] grid_3.5.0 R6_2.2.2 survival_2.42-3 backports_1.1.2 codetools_0.2-15
[31] splines_3.5.0 assertthat_0.2.0 stringi_1.2.4 survey_3.33-2 crayon_1.3.4
[test-preambule.txt](https://github.com/brodieG/unitizer/files/2315457/test-preambule.txt)
using also french accented characters
Great, thanks for taking the time to do this.
One immediate comment is that while there is obviously a problem with the parsing, it seems that the fallback simple parsing is working fine. The parsing that fails is the one that tries to extract the comments and associates the comments with the expressions. So while you'll get that (caught) error and the warning, everything will work fine other than you won't be able to see the comments within unitizer
.
The reason this all does not appear to be working, I think, is that there aren't actually any tests in the file as far as unitizer
is concerned. A test is an expression that produces visible output (i.e. would print something to the console). To make your code a test you would need:
chain <- foreach( el = iter(df, by = "row"), .errorhandling = "pass") %do% {...}
chain # this produces visible output, and is therefore a test
or alternatively:
(chain <- foreach( el = iter(df, by = "row"), .errorhandling = "pass") %do% {...})
For more details you can see the "What Constitutes a Test?" section of vignette(package='unitizer', 'u2_tests')
.
I'll explore the parsing issue to see what's going on there, but that alone should not prevent unitizer
from working.
Thanks for the feedback
I got the error on a file with a test in it but suppressed anything that did not suppress the parse error before sending you the offending example.
But indeed, that does not prevent using unitizer, just removed all the comments and it worked without warning.
If you don't mind I'm going to leave this open as a reminder to look into the parsing. It should work, really.
of course !
Le 23 août 2018 à 20:03, Brodie Gaslam notifications@github.com a écrit :
If you don't mind I'm going to leave this open as a reminder to look into the parsing. It should work, really.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/brodieG/unitizer/issues/250#issuecomment-415513732, or mute the thread https://github.com/notifications/unsubscribe-auth/AAio_hc0-ivUYduNFWbVEb78X7AS_37aks5uTu6HgaJpZM4WJ15_.
Hello
Trying unititzer on a 50 lines script, but got the answer
I can send you the script separately, but do not want to publish it on line
thanks