• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Ruby file loading problem

Scheduled Pinned Locked Moved Extensions & Applications Discussions
extensions
5 Posts 2 Posters 1.1k Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    harvey13
    last edited by 8 Dec 2016, 18:08

    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 ?

    1 Reply Last reply Reply Quote 0
    • T Offline
      TIG Moderator
      last edited by 8 Dec 2016, 18:19

      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 ??

      TIG

      1 Reply Last reply Reply Quote 0
      • H Offline
        harvey13
        last edited by 10 Dec 2016, 00:13

        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.

        1 Reply Last reply Reply Quote 0
        • T Offline
          TIG Moderator
          last edited by 10 Dec 2016, 17:04

          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=2Dtools

          I 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 says break !

          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

          TIG

          1 Reply Last reply Reply Quote 0
          • H Offline
            harvey13
            last edited by 11 Dec 2016, 12:44

            Hello TIG
            I installed from your link and it works fine...
            Thank you

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            1 / 1
            • First post
              1/5
              Last post
            Buy SketchPlus
            Buy SUbD
            Buy WrapR
            Buy eBook
            Buy Modelur
            Buy Vertex Tools
            Buy SketchCuisine
            Buy FormFonts

            Advertisement