Ruby file loading problem
-
Hello
I wanted to use 2D Tools extension
I got the error :Error; #<ArgumentError; invalid byte sequence in UTF-8> C;/Users/LRT/AppData/Roaming/SketchUp/SketchUp 2017/SketchUp/Plugins/deBabelizer.rb;134;in `=~'
That comes for the second line :
s=/<==>/ if txt=~s set=txt.split("<==>") sets<<set end#if
It seems that sketchup doesn't recognize the tilde when reading this file.
When I write the tilde into the Ruby console it works.(with the same test)As my file is UTF-8 encoded, why is there that error ?
-
If you install 2Dtools from its RBZ it also installs deBabelizer.
You should not get a UTF-8 error with the latest files loading.
Line #134 in the latest file does NOT have that text, so it suggests you have copied files from an older SketchUp version - rather than installing a newer compatible version...
You second code example bears no resemblance to the current deBabelizer code...
So I think you need a proper up to date installation ?? -
In fact on the current version there is the regex pattern and the =~ operator on the same line, that's why I separated it, so to find which part the error comes from...
At this time I could not use this extension because of this error. -
Have you installed 2Dtools from its PluginStore's latest RBZ [v7.6] ?
If you have done this it will have also installed the latest deBabelizer.rb
http://sketchucation.com/pluginstore?pln=2DtoolsI repeat... the code you posted is NOT in the current deBabelizer.rb.
The error-message refers to line#134 and=~
But in the current version that line saysbreak
!I suspect you have an old and incompatible version installed ?
You should always install the latest versions of Extensions when using a new SketchUp version.The deBabelizer plugin does not need to be installed separately, because it comes packaged with any newer extensions' RBZ archives when it is needed.
You should not never to edit any script files to get an Extension to work.
Indeed doing that will break the hash used to sign it for use in >=v2016, except in the Unrestricted Loading Policy -
Hello TIG
I installed from your link and it works fine...
Thank you
Advertisement