sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Plugin] TT_Lib²

    Scheduled Pinned Locked Moved Plugins
    310 Posts 66 Posters 394.3k Views 66 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.
    • thomthomT Offline
      thomthom
      last edited by

      I'm not able to reproduce the TT::System loading error...

      Thomas Thomassen — SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        I get it on PC & MAC v2013...
        😕
        Unless I re-jig you code to use the nonexistent foobar.rb and NOT register the extension anyway...
        Then it's all OK.
        😒

        TIG

        1 Reply Last reply Reply Quote 0
        • tt_suT Offline
          tt_su
          last edited by

          Does it happen with a clean Plugins folder?

          1 Reply Last reply Reply Quote 0
          • TIGT Offline
            TIG Moderator
            last edited by

            @unknownuser said:

            Error Loading File C:/Program Files/Google/Google SketchUp 8/Plugins/TT_Lib2/core.rb
            uninitialized constant TT::SystemError Loading File TT_Lib2.rb
            uninitialized constant TT::System
            With nothing except "TT_Lib2" loading from Plugins [and only the 3 'required' rb's in Tools - sketchup. langhandler and extensions] - error happens in both basic v8 [PC] & v2013 [PC & MAC]...
            But oddly 'another version' doesn't display the issue at all ? 😉

            Incidentally, this one simple change to your script stops these error message...
            **#**Sketchup.register_extension( ex, true )
            There is no need to register the mock-Extension as it is doing nothing, and other tools will load what they need from it anyway... 😕

            TIG

            1 Reply Last reply Reply Quote 0
            • tt_suT Offline
              tt_su
              last edited by

              Thanks for the reports TIG. I'll dig into it. I need to make some emergency patches for that other version anyway as well.

              1 Reply Last reply Reply Quote 0
              • TIGT Offline
                TIG Moderator
                last edited by

                One odd thing I noticed is a circular 'require' in two of your rb's ?

                In core.rb [which 'loads' first from the extension code load]...
                require 'TT_Lib2/system.rb'

                In system.rb which has been called by core.rb...
                require 'TT_Lib2/core.rb'

                So maybe the TT::System isn't initiated properly and the error occurs [with Ruby 1.8] ?
                The require of the core.rb should skip if the code is already loaded, BUT maybe the extension load doesn't register in the list in the same way, and a second attempt occur with an error message...

                TIG

                1 Reply Last reply Reply Quote 0
                • tt_suT Offline
                  tt_su
                  last edited by

                  Maybe... I thought Ruby was able to deal with circular require, but I've had cases where it seem to cause problems. This might be one of them - I introduced the system.rb require to core.rb recently.

                  1 Reply Last reply Reply Quote 0
                  • TIGT Offline
                    TIG Moderator
                    last edited by

                    There isn't a circular require as such...
                    If the core.rb is loaded/required, then it in turn requires the system.rb...
                    That in turn requires the core.rb BUT it is skipped because the core.rb has already been loaded.

                    BUT your TT_Lib2.rb code doesn't actually 'load or require' the core.rb - but rather it specifies it in an Extension.new(), and then it runs register_extension() that extension [which is where it breaks it]...
                    I suspect that [in versions up to v2013 at least] the extension's rb register_extension() does NOT get listed in the 'loaded' list [I forget its proper name!], although it does 'load' the code in some way, so... then core.rb's code requires system.rb which requires core.rb in the normal way, but at that point it tries to load core.rb thinking it's for the first time when it's the second !
                    So core.rb now skips system.rb's require because it thinks it's been done ???

                    Whatever is happening... just stopping the extension code without doing a register_extension() avoids this issue because it doesn't need loading at all any way...

                    TIG

                    1 Reply Last reply Reply Quote 0
                    • tt_suT Offline
                      tt_su
                      last edited by

                      @tig said:

                      On PC and MAC I now get this issue whenever SketchUp starts
                      @unknownuser said:

                      Error Loading File C:/Program Files/SketchUp/SketchUp 2013/Plugins/TT_Lib2/core.rb
                      uninitialized constant TT::System
                      Error Loading File TT_Lib2.rb
                      uninitialized constant TT::System
                      One step forward one back.

                      I tried with a fresh install of TT_Lib2 on SU8 and SU2013 - under SU8 I never saw the error. Under SU2013 I saw the error when I had the console open when I installed. However, when I restarted SU there was no errors and everything was working fine... :s

                      1 Reply Last reply Reply Quote 0
                      • TIGT Offline
                        TIG Moderator
                        last edited by

                        To double check... I removed all of your tools and the TT_Lib2 files from my v2013 Plugins folder.
                        I then reinstalled the latest TT_Lib2 version - v2.9.5 [?].

                        After that, whenever I restarted SketchUp it gives the same error-message as previously reported.
                        As before adding a # in front of the line that registers your spurious extension [and thereby tries to load the core.rb] stops the error as SketchUp starts, but it does not affect the Lib at all, since other tt installed tools 'properly' load any code as needed from the Lib, which does NOT need to be an extension at all...
                        😒

                        TIG

                        1 Reply Last reply Reply Quote 0
                        • tt_suT Offline
                          tt_su
                          last edited by

                          What Windows version are you using?

                          (I want to get to the actual cause of this, fixing the actual problem instead of patching the symptom - which is why I need to reproduce this.)

                          1 Reply Last reply Reply Quote 0
                          • tt_suT Offline
                            tt_su
                            last edited by

                            Ah! Now I reproduce it. If TT_Lib is loading all by itself.

                            I had AutoSmooth installed which loaded the core.rb file - then there was no errors.

                            1 Reply Last reply Reply Quote 0
                            • thomthomT Offline
                              thomthom
                              last edited by

                              Pushed a new version 2.9.6 to BitBucket and the PluginStore. Should take care of the Load Errors and compatibility with PluginStore - for realz this time!

                              Thomas Thomassen — SketchUp Monkey & Coding addict
                              List of my plugins and link to the CookieWare fund

                              1 Reply Last reply Reply Quote 0
                              • C Offline
                                cchere
                                last edited by

                                Thank you for the new version file (v2.9.7),it works well at last.No more "core.rb" problem when SU start up(with v2.9.5).

                                1 Reply Last reply Reply Quote 0
                                • B Offline
                                  billiam
                                  last edited by

                                  having trouble installing this, when opening sketchup an error appears that says some of my files are in the windows virtual store. I am the only user on this laptop and have full permissions. I have also been searching for the compatibility button (researched on another thread) and I have been unable to find it/

                                  I did not install this as a .rbz but switched the file name to .zip, then copied TT-lib folder and TT-lib.rb into the plugins folder. Am I missing something

                                  please help

                                  1 Reply Last reply Reply Quote 0
                                  • Dave RD Offline
                                    Dave R
                                    last edited by

                                    You need FULL administrative privileges for the Plugins folder. Edit those privileges and you'll be able to either move the files from the Virtual Store or reinstall.

                                    You should just install the .RBZ file instead of converting to ZIP. You should also download and install the Sketchucation Plugin Store.

                                    Etaoin Shrdlu

                                    %

                                    (THERE'S NO PLACE LIKE)

                                    G28 X0.0 Y0.0 Z0.0

                                    M30

                                    %

                                    1 Reply Last reply Reply Quote 0
                                    • tt_suT Offline
                                      tt_su
                                      last edited by

                                      After that message there should be an Explorer window opening, which is contains the Virtual Store files. Note the full file path in the address bar. Those files should be in the real Plugins folder.

                                      1 Reply Last reply Reply Quote 0
                                      • S Offline
                                        SKPudden
                                        last edited by

                                        Sorry - new core.rb problem here:

                                        Having 'inherited' some large, complex and badly-built SU models, I need a way to clean them up without resorting to a dozen partial solutions. I've been trying to get TT_cleanup to work, but I'm getting the following error when Sketchup starts:

                                        Error Loading File /Library/Application Support/Google SketchUp 7/SketchUp/Plugins/TT_Lib2/core.rb
                                        can't convert nil into StringError Loading File /Library/Application Support/Google SketchUp 7/SketchUp/Plugins/TT_Lib2.rb
                                        can't convert nil into StringError Loading File /Library/Application Support/Google SketchUp 7/SketchUp/Plugins/tt_cleanup/core.rb
                                        can't convert nil into StringError Loading File tt_cleanup.rb
                                        can't convert nil into String

                                        I should maybe mention that my Mac is a PPC G4 (there's a lot of us left!) and I'm using the most recent versions of the plugin and library. I'm beginning to wonder if the hardware may be the problem. It is rather old (without being in any sense rickety). This said, I haven't experienced problems with any other plugins (yet).

                                        But I'm sure someone will know better than me...

                                        1 Reply Last reply Reply Quote 0
                                        • tt_suT Offline
                                          tt_su
                                          last edited by

                                          hm.. missing a stacktrace there.

                                          Can you try these commands in the Ruby Console:

                                          load 'tt_cleanup.rb'

                                          load 'tt_cleanup/core.rb'

                                          ?

                                          See if you get a more detailed error message?

                                          Also, what version of TT_Lib and CleanUp do you have installed?

                                          1 Reply Last reply Reply Quote 0
                                          • S Offline
                                            SKPudden
                                            last edited by

                                            Hi TT

                                            Thanks for the fast response.

                                            Here's what the Console gives me:

                                            load 'tt_cleanup.rb'
                                            /Library/Application Support/Google SketchUp 7/SketchUp/Plugins/tt_cleanup.rb:20: warning: already initialized constant PLUGIN_ID
                                            /Library/Application Support/Google SketchUp 7/SketchUp/Plugins/tt_cleanup.rb:21: warning: already initialized constant PLUGIN_NAME
                                            /Library/Application Support/Google SketchUp 7/SketchUp/Plugins/tt_cleanup.rb:22: warning: already initialized constant PLUGIN_VERSION
                                            /Library/Application Support/Google SketchUp 7/SketchUp/Plugins/tt_cleanup.rb:25: warning: already initialized constant FILENAMESPACE
                                            /Library/Application Support/Google SketchUp 7/SketchUp/Plugins/tt_cleanup.rb:26: warning: already initialized constant PATH_ROOT
                                            /Library/Application Support/Google SketchUp 7/SketchUp/Plugins/tt_cleanup.rb:27: warning: already initialized constant PATH
                                            true

                                            load 'tt_cleanup/core.rb'
                                            /Library/Application Support/Google SketchUp 7/SketchUp/Plugins/TT_Lib2.rb:19: warning: already initialized constant PLUGIN_ID
                                            /Library/Application Support/Google SketchUp 7/SketchUp/Plugins/TT_Lib2.rb:20: warning: already initialized constant PLUGIN_NAME
                                            /Library/Application Support/Google SketchUp 7/SketchUp/Plugins/TT_Lib2.rb:21: warning: already initialized constant PLUGIN_VERSION
                                            /Library/Application Support/Google SketchUp 7/SketchUp/Plugins/TT_Lib2/system.rb:16: warning: already initialized constant PLATFORM_IS_OSX
                                            /Library/Application Support/Google SketchUp 7/SketchUp/Plugins/TT_Lib2/system.rb:19: warning: already initialized constant PLATFORM_IS_WINDOWS
                                            Error: #<TypeError: /Library/Application Support/Google SketchUp 7/SketchUp/Plugins/TT_Lib2/system.rb:22:in expand_path': can't convert nil into String> /Library/Application Support/Google SketchUp 7/SketchUp/Plugins/tt_cleanup/core.rb:11 /Library/Application Support/Google SketchUp 7/SketchUp/Plugins/TT_Lib2/system.rb:22 /Library/Application Support/Google SketchUp 7/SketchUp/Plugins/TT_Lib2/core.rb:10:in require'
                                            /Library/Application Support/Google SketchUp 7/SketchUp/Plugins/TT_Lib2/core.rb:10
                                            /Library/Application Support/Google SketchUp 7/SketchUp/Plugins/tt_cleanup/core.rb:10:in require' /Library/Application Support/Google SketchUp 7/SketchUp/Plugins/tt_cleanup/core.rb:10 (eval):155:in load'
                                            (eval):155

                                            The versions installed are:

                                            Cleanup 3.2.0
                                            TT Lib 2.9.8

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 9
                                            • 10
                                            • 11
                                            • 12
                                            • 13
                                            • 14
                                            • 15
                                            • 16
                                            • 11 / 16
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement