[Plugin] TT_Lib²
-
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.
-
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 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
-
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...
-
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.)
-
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.
-
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!
-
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).
-
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
-
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.
-
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.
-
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 StringI 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...
-
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?
-
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
trueload '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:inexpand_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:inrequire' /Library/Application Support/Google SketchUp 7/SketchUp/Plugins/tt_cleanup/core.rb:10 (eval):155:in
load'
(eval):155The versions installed are:
Cleanup 3.2.0
TT Lib 2.9.8 -
Oh, I forgot to come back to this issue. Is it still an issue or have you found a way to resolve it?
-
Hi Thomas. Thanks for getting back to me. I now have a working setup but only on my Mac at work. it's an Intel Mac Mini running 10.5.8 and I'm using SU7, TT_Cleanup 3.2.1 with TT_Lib 2.7.1. I tried 2.7.0, 2.8.3 and 2.9.8 before this and none of them worked. On my home computer, a G4 desktop running 10.4.11, no combination of TT_Cleanup and TT_Lib will work. I've tried them all (many times). Do you have any suggestions? Thanks.
-
Further to my earlier post:
-
I now have a working setup on a 10.5.8 partition on my home Mac, using TT_Cleanup 3.2.1 and TT_Lib2 2.7.1 (the same setup as my Mac at work). I haven't tried every possible combination, but 2.9.8 definitely won't work. Having to use a separate partition is obviously not ideal, but it's a workround - a pity all my other stuff is on the main partition (running 10.4.11).
-
I now have a working setup on the main partition using Cleanup 2.0.0. which of course requires no TT_Lib. Again not ideal, but it's a workround.
It appears that the operating system may be the problem. Is there a way to get the more recent versions of TT_Cleanup and TT_Lib2 to run on OSX 10.4.11? If not, what is the most recent version of TT_Cleanup that will run on 10.4.11 (with or without TT_Lib)?
Trouble is, Cleanup3 is such an advance on 2 that I may have to consider upgrading the main partition just to get the benefits!
-
-
10.4...hmm... been a long time since I used that. I think I have an old G4 Mac Mini somewhere. Though not sure if it's alive.
And what's the latest SketchUp version you can run on 10.4? (Guess I should know this.... :s) -
I knew you'd say that :OD
On 10.4 the latest version of Sketchup is 7. Leopard can use 8.
-
ThomThom , thank you for your great plugins!
I use Sketchup 2014 on Win8.1 and I have problem. I installed your current plugins but error appear. I had simillar problem with other plugins but I resolved this by creating other plugin folder without polish letters. But if moved your plugins to this folder it doesn't work. please help.Thank you.
Error below:Error Loading File C:/Users/Stanisław/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/TT_Lib2/core.rb
Error: #<IOError: Path not found>
C:/Users/Stanisław/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/TT_Lib2/c_extension_manager.rb:49:ininitialize' C:/Users/Stanisław/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/TT_Lib2/core.rb:124:in
new'
C:/Users/Stanisław/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/TT_Lib2/core.rb:124:in<module:Lib>' C:/Users/Stanisław/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/TT_Lib2/core.rb:110:in
module:TT'
C:/Users/Stanisław/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/TT_Lib2/core.rb:20:in<top (required)>' C:/Program Files (x86)/SketchUp/SketchUp 2014/Tools/extensions.rb:197:in
require'
C:/Program Files (x86)/SketchUp/SketchUp 2014/Tools/extensions.rb:197:inload' C:/Users/Stanisław/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/TT_Lib2.rb:40:in
register_extension'
C:/Users/Stanisław/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/TT_Lib2.rb:40:in<module:Lib>' C:/Users/Stanisław/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/TT_Lib2.rb:14:in
module:TT'
C:/Users/Stanisław/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/TT_Lib2.rb:13:in<top (required)>' Error Loading File C:/Users/Stanisław/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/tt_material_tools/core.rb Error: #<IOError: Path not found> C:/Users/Stanisław/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/TT_Lib2/c_extension_manager.rb:49:in
initialize'
C:/Users/Stanisław/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/TT_Lib2/core.rb:124:innew' C:/Users/Stanisław/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/TT_Lib2/core.rb:124:in
module:Lib'
C:/Users/Stanisław/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/TT_Lib2/core.rb:110:in<module:TT>' C:/Users/Stanisław/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/TT_Lib2/core.rb:20:in
<top (required)>'
C:/Program Files (x86)/SketchUp/SketchUp 2014/Tools/RubyStdLib/rubygems/core_ext/kernel_require.rb:45:inrequire' C:/Program Files (x86)/SketchUp/SketchUp 2014/Tools/RubyStdLib/rubygems/core_ext/kernel_require.rb:45:in
require'
C:/Users/Stanisław/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/tt_material_tools/core.rb:10:in<top (required)>' C:/Program Files (x86)/SketchUp/SketchUp 2014/Tools/extensions.rb:197:in
require'
C:/Program Files (x86)/SketchUp/SketchUp 2014/Tools/extensions.rb:197:inload' C:/Users/Stanisław/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/tt_material_tools.rb:39:in
register_extension'
C:/Users/Stanisław/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/tt_material_tools.rb:39:in<module:MaterialTools>' C:/Users/Stanisław/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/tt_material_tools.rb:15:in
module:Plugins'
C:/Users/Stanisław/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/tt_material_tools.rb:14:in<module:TT>' C:/Users/Stanisław/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/tt_material_tools.rb:13:in
<top (required)>'Thanks for help!
Advertisement