I was getting errors (Ruby errors, I believe) when trying to use the TODO List bundle, so, finding the "TODO Bundle Broken" thread in this list and trying to follow the advice there, I deleted some bundles (and some unused plugins I discovered in the process) from "~/Library/Application Support/Textmate" and also updated all the bundles in my "/Users/mjg/Library/Application Support/TextMate/Bundles/" directory from subversion.
Now the TODO List bundle is working beautifully (for the first time!), but when I try to use PyMate "Run Script" command to run a Python file I get this error: "-e:2:in `require': No such file to load -- /Applications/TextMate.app/Contents/SharedSupport/Support/lib/tm/executor (LoadError) from -e:2". It's true that there is no such file--in fact, the "/Applications/TextMate.app/Contents/SharedSupport/Support/lib/tm/" directory does not exist. Why is this error happening and what should I do about it?
For what it's worth: other PyMate commands (such as "Run Script (Terminal)" still appear to work correctly.
I'm running the latest "Cutting-Edge" TextMate, Version 1.5.7 (1464).
Thanks,
Mike
On Jun 27, 2008, at 6:55 AM, Michael Glassford wrote:
I was getting errors (Ruby errors, I believe) when trying to use the TODO List bundle, so, finding the "TODO Bundle Broken" thread in this list and trying to follow the advice there, I deleted some bundles (and some unused plugins I discovered in the process) from "~/Library/Application Support/Textmate" and also updated all the bundles in my "/Users/mjg/Library/Application Support/TextMate/ Bundles/" directory from subversion.
Now the TODO List bundle is working beautifully (for the first time!), but when I try to use PyMate "Run Script" command to run a Python file I get this error: "-e:2:in `require': No such file to load -- /Applications/TextMate.app/Contents/SharedSupport/Support/lib/tm/ executor (LoadError) from -e:2". It's true that there is no such file--in fact, the "/Applications/TextMate.app/Contents/SharedSupport/Support/lib/ tm/" directory does not exist. Why is this error happening and what should I do about it?
You either don't have a copy of the Support folder, or the copy that you have is outdated. You need to check it out, or update it. You should probably do an entirely new checkout of http://http:// macromates.com/svn/Bundles/trunk into ~/Library/Application\ Support/ TextMate, instead of the partial checkout that you have currently.
Thanks: that fixed it, of course. When I set up my svn commands for updating TextMate bundles a long time ago, I apparently missed the part about needing to get the Support Folder also.
Again, thanks.
Mike
Alex Ross wrote:
On Jun 27, 2008, at 6:55 AM, Michael Glassford wrote:
I was getting errors (Ruby errors, I believe) when trying to use the TODO List bundle, so, finding the "TODO Bundle Broken" thread in this list and trying to follow the advice there, I deleted some bundles (and some unused plugins I discovered in the process) from "~/Library/Application Support/Textmate" and also updated all the bundles in my "/Users/mjg/Library/Application Support/TextMate/ Bundles/" directory from subversion.
Now the TODO List bundle is working beautifully (for the first time!), but when I try to use PyMate "Run Script" command to run a Python file I get this error: "-e:2:in `require': No such file to load -- /Applications/TextMate.app/Contents/SharedSupport/Support/lib/tm/ executor (LoadError) from -e:2". It's true that there is no such file--in fact, the "/Applications/TextMate.app/Contents/SharedSupport/Support/lib/ tm/" directory does not exist. Why is this error happening and what should I do about it?
You either don't have a copy of the Support folder, or the copy that you have is outdated. You need to check it out, or update it. You should probably do an entirely new checkout of http://http:// macromates.com/svn/Bundles/trunk into ~/Library/Application\ Support/ TextMate, instead of the partial checkout that you have currently.
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
Revisiting this issue: when I said below, "that fixed it of course", I meant that it stopped giving me the error I mention below. It wasn't until the next day, when I tried actually using it, that I noticed it isn't really working. Now it always shows an a window with an empty gray box (where the output from the script would normally go) and the text "Program exited" below it. None of the script's output is ever shown. The "Run in Terminal" command works as expected; that's what I've been using because I was too busy until now to ask about it.
Any ideas?
Mike
Michael Glassford wrote:
Thanks: that fixed it, of course. When I set up my svn commands for updating TextMate bundles a long time ago, I apparently missed the part about needing to get the Support Folder also.
Again, thanks.
Mike
Alex Ross wrote:
On Jun 27, 2008, at 6:55 AM, Michael Glassford wrote:
I was getting errors (Ruby errors, I believe) when trying to use the TODO List bundle, so, finding the "TODO Bundle Broken" thread in this list and trying to follow the advice there, I deleted some bundles (and some unused plugins I discovered in the process) from "~/Library/Application Support/Textmate" and also updated all the bundles in my "/Users/mjg/Library/Application Support/TextMate/ Bundles/" directory from subversion.
Now the TODO List bundle is working beautifully (for the first time!), but when I try to use PyMate "Run Script" command to run a Python file I get this error: "-e:2:in `require': No such file to load -- /Applications/TextMate.app/Contents/SharedSupport/Support/lib/tm/ executor (LoadError) from -e:2". It's true that there is no such file--in fact, the "/Applications/TextMate.app/Contents/SharedSupport/Support/lib/ tm/" directory does not exist. Why is this error happening and what should I do about it?
You either don't have a copy of the Support folder, or the copy that you have is outdated. You need to check it out, or update it. You should probably do an entirely new checkout of http://http:// macromates.com/svn/Bundles/trunk into ~/Library/Application\ Support/ TextMate, instead of the partial checkout that you have currently.
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On Wed, Jul 2, 2008 at 8:50 PM, Michael Glassford glassfordm@gmail.com wrote:
Revisiting this issue: when I said below, "that fixed it of course", I meant that it stopped giving me the error I mention below. It wasn't until the next day, when I tried actually using it, that I noticed it isn't really working. Now it always shows an a window with an empty gray box (where the output from the script would normally go) and the text "Program exited" below it. None of the script's output is ever shown. The "Run in Terminal" command works as expected; that's what I've been using because I was too busy until now to ask about it.
Any ideas?
In TextMate preferences, click the "Check for Updates" button while holding the Option key. I think you might not have the interactive input dynamic library that Executor loads.
–Alex
I guess the option key gives you an extra-sharp Cutting Edge version :)
I tried it, but unfortunately it didn't help. Where's the interactive input dynamic library live and what's it called? I can look for it if that will help.
Mike
Alexander Ross wrote:
On Wed, Jul 2, 2008 at 8:50 PM, Michael Glassford glassfordm@gmail.com wrote:
Revisiting this issue: when I said below, "that fixed it of course", I meant that it stopped giving me the error I mention below. It wasn't until the next day, when I tried actually using it, that I noticed it isn't really working. Now it always shows an a window with an empty gray box (where the output from the script would normally go) and the text "Program exited" below it. None of the script's output is ever shown. The "Run in Terminal" command works as expected; that's what I've been using because I was too busy until now to ask about it.
Any ideas?
In TextMate preferences, click the "Check for Updates" button while holding the Option key. I think you might not have the interactive input dynamic library that Executor loads.
–Alex
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On 3 Jul 2008, at 14:34, Michael Glassford wrote:
I guess the option key gives you an extra-sharp Cutting Edge version :)
Yes, but this update won't update the entire lib. The subfolder lib/tm is missing (it contains the Executor stuff). I guess you should do a svn checkout of TM's lib path http://macromates.com/svn/Bundles/trunk/Support/lib/ .
--Hans
I already have a /Library/Application Support/TextMate/Support/lib/tm/executor.rb. Just to be safe, I did an svn update, but that didn't update anyting in the lib subdirectory and didn't help.
Hans-Joerg Bibiko wrote:
On 3 Jul 2008, at 14:34, Michael Glassford wrote:
I guess the option key gives you an extra-sharp Cutting Edge version :)
Yes, but this update won't update the entire lib. The subfolder lib/tm is missing (it contains the Executor stuff). I guess you should do a svn checkout of TM's lib path http://macromates.com/svn/Bundles/trunk/Support/lib/ .
--Hans
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On Jul 3, 2008, at 5:34 AM, Michael Glassford wrote:
I guess the option key gives you an extra-sharp Cutting Edge version :)
Don't cut yourself.
I tried it, but unfortunately it didn't help. Where's the interactive input dynamic library live and what's it called? I can look for it if that will help.
I think it may help to delete your checkout, and also be sure that there is no old code in ~/Library/Application\ Support/TextMate. It's possible that something from the old PyMate is interfering. Make a fresh new checkout.
If that doesn't work... what version of Python are you running? Do you have a sitecustomize.py on your PYTHONPATH? Any other funny python configuration issues that I can't think of?
If you create a new user, and attempt the command does it work?
–Alex
Alex Ross wrote:
On Jul 3, 2008, at 5:34 AM, Michael Glassford wrote:
I guess the option key gives you an extra-sharp Cutting Edge version :)
Don't cut yourself.
I tried it, but unfortunately it didn't help. Where's the interactive input dynamic library live and what's it called? I can look for it if that will help.
I think it may help to delete your checkout, and also be sure that there is no old code in ~/Library/Application\ Support/TextMate.
Because I did this when I was having problems before, there's only one thing there: a bundle I created that has only a single command in it.
It's possible that something from the old PyMate is interfering. Make a fresh new checkout.
Unfortunately, this didn't help.
If that doesn't work... what version of Python are you running?
2.5.2
I'm also running OSX 10.4.11, if that matters, and the version of Ruby that is installed in it by default, I believe: ruby 1.8.2.
Do you have a sitecustomize.py on your PYTHONPATH?
The only one I could find anywhere on my drive is at /Library/Application Support/TextMate/Bundles/Python.tmbundle/Support/sitecustomize.py. It's not on my PYTHONPATH.
Any other funny python configuration issues that I can't think of?
None that I know of.
If you create a new user, and attempt the command does it work?
At first I thought that it did (I created a .py file containing a single print statement and saw the output), but then I ran the same file under my normal user and saw that output too. But when I ran the unit test that I'd been using to try it before, I still saw no output from that, although it generates a lot of output when run in a Terminal window.
Mike
Michael Glassford wrote:
[snip]
If you create a new user, and attempt the command does it work?
At first I thought that it did (I created a .py file containing a single print statement and saw the output), but then I ran the same file under my normal user and saw that output too. But when I ran the unit test that I'd been using to try it before, I still saw no output from that, although it generates a lot of output when run in a Terminal window.
This fact led me to do some further experimentation. What I found out is that the "Run Script" command of the Python bundle does not display any of the script's output if the script, either directly or indirectly, imports scipy.stats.
FYI:
scipy.__version__
'0.6.0'
scipy.__numpy_version__
'1.0.4'
Hope this helps.
Mike
On Jul 3, 2008, at 6:54 PM, Michael Glassford wrote:
Michael Glassford wrote:
[snip]
If you create a new user, and attempt the command does it work?
At first I thought that it did (I created a .py file containing a single print statement and saw the output), but then I ran the same file under my normal user and saw that output too. But when I ran the unit test that I'd been using to try it before, I still saw no output from that, although it generates a lot of output when run in a Terminal window.
This fact led me to do some further experimentation. What I found out is that the "Run Script" command of the Python bundle does not display any of the script's output if the script, either directly or indirectly, imports scipy.stats.
FYI:
scipy.__version__
'0.6.0'
scipy.__numpy_version__
'1.0.4'
I have a copy of scipy 0.7.0 installed here and it is working just fine. I will uninstall it, and install scipy 0.6.0 to see if I can figure out what's going on. In the meantime, upgrading scipy might fix the issue for you.
Now:
numpy.__version__
'1.2.0.dev5346'
scipy.__version__
'0.7.0.dev4527'
But the output still doesn't work.
Note that importing scipy doesn't cause problems, but importing scipy.stats does. If I "Run Script" this script:
import numpy print numpy.__version__
import scipy print scipy.__version__
import scipy.stats print 'Done'
I see this output:
1.2.0.dev5346 0.7.0.dev4527
But if I "Run Script (Terminal)", I see this:
1.2.0.dev5346 0.7.0.dev4527 Done
Mike
Alex Ross wrote:
On Jul 3, 2008, at 6:54 PM, Michael Glassford wrote:
Michael Glassford wrote:
[snip]
If you create a new user, and attempt the command does it work?
At first I thought that it did (I created a .py file containing a single print statement and saw the output), but then I ran the same file under my normal user and saw that output too. But when I ran the unit test that I'd been using to try it before, I still saw no output from that, although it generates a lot of output when run in a Terminal window.
This fact led me to do some further experimentation. What I found out is that the "Run Script" command of the Python bundle does not display any of the script's output if the script, either directly or indirectly, imports scipy.stats.
FYI:
scipy.__version__
'0.6.0'
scipy.__numpy_version__
'1.0.4'
I have a copy of scipy 0.7.0 installed here and it is working just fine. I will uninstall it, and install scipy 0.6.0 to see if I can figure out what's going on. In the meantime, upgrading scipy might fix the issue for you.
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On Jul 3, 2008, at 10:21 PM, Michael Glassford wrote:
Now:
numpy.__version__
'1.2.0.dev5346'
scipy.__version__
'0.7.0.dev4527'
But the output still doesn't work.
Note that importing scipy doesn't cause problems, but importing scipy.stats does. If I "Run Script" this script:
import numpy print numpy.__version__
import scipy print scipy.__version__
import scipy.stats print 'Done'
I see this output:
1.2.0.dev5346 0.7.0.dev4527
But if I "Run Script (Terminal)", I see this:
1.2.0.dev5346 0.7.0.dev4527 Done
Hm... I can't reproduce this behaviour.
Try this:
open up executor.rb, it's in TextMate/Support/lib/tm/executor.rb.
Find the lines:
callback = proc {|str, type| io << block.call(str,type)} process_output_wrapper(io) do TextMate::Process.run(args, :env => options[:env], :echo => true, &callback) end
Change this line
TextMate::Process.run(args, :env => options[:env], :echo =>
true, &callback)
to
TextMate::Process.run(args, :env => options[:env], :echo =>
true, :interactive_input => false, &callback)
Save and try to run your example script from TextMate again.
Does that change anything?
The change you suggest below to executor.rb does fix the problem.
Interestingly, another difference is that, without the change, there's a pause of a few seconds between the time "0.7.0.dev4527" is printed and the time "Program exited." is printed. With the change, there's almost no time at all between them.
Mike
Alex Ross wrote:
On Jul 3, 2008, at 10:21 PM, Michael Glassford wrote:
Now:
numpy.__version__
'1.2.0.dev5346'
scipy.__version__
'0.7.0.dev4527'
But the output still doesn't work.
Note that importing scipy doesn't cause problems, but importing scipy.stats does. If I "Run Script" this script:
import numpy print numpy.__version__
import scipy print scipy.__version__
import scipy.stats print 'Done'
I see this output:
1.2.0.dev5346 0.7.0.dev4527
But if I "Run Script (Terminal)", I see this:
1.2.0.dev5346 0.7.0.dev4527 Done
Hm... I can't reproduce this behaviour.
Try this:
open up executor.rb, it's in TextMate/Support/lib/tm/executor.rb.
Find the lines:
callback = proc {|str, type| io << block.call(str,type)} process_output_wrapper(io) do TextMate::Process.run(args, :env => options[:env], :echo => true, &callback) end
Change this line
TextMate::Process.run(args, :env => options[:env], :echo =>
true, &callback)
to
TextMate::Process.run(args, :env => options[:env], :echo =>
true, :interactive_input => false, &callback)
Save and try to run your example script from TextMate again.
Does that change anything?
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
At first I thought that it did (I created a .py file containing a single print statement and saw the output), but then I ran the same file under my normal user and saw that output too. But when I ran the unit test that I'd been using to try it before, I still saw no output from that, although it generates a lot of output when run in a Terminal window.
Ah, so it works for python programs that just print something? Can you post a minimal example of a program that doesn't work correctly?