witsch / SublimePythonTidy

A Sublime Text 2 plugin for PythonTidy integration
41 stars 5 forks source link

ImportError: No module named PythonTidy #6

Open miohtama opened 12 years ago

miohtama commented 12 years ago

SublimePythonTidy seems to depend on PythonTidy, but does not support instructions how to configure one.

This shows on console when trying to execute PythonTidy

Reloading plugin /Users/moo/Library/Application Support/Sublime Text 2/Packages/PythonTidy/Tidy.py
Traceback (most recent call last):
  File "./sublime_plugin.py", line 62, in reload_plugin
  File "./Tidy.py", line 17, in <module>
ImportError: No module named PythonTidy

OSX Lion

miohtama commented 12 years ago

Ah, my guess is that Package Control installation is broken for SublimePythonTidy, because it referes to external Git repo.

I suggest either to fix or disable Package Control installation method.

sindresorhus commented 12 years ago

Package Control currently doesn't support git submodules: wbond/sublime_package_control#126

You could create a custom package or just include PythonTidy in the repo

// @witsch

jfroco commented 11 years ago

Hi,

Same problem here. To solved it, I did the following:

1.- Downloaded https://github.com/witsch/PythonTidy/archive/master.zip and put the files inside the master folrder in the Packages/PythonTidy/PythonTidy folder

2.- Edited Packages/PythonTidy/Tidy.py and commented the following lines:

if not exists(join(extra, '.git')): call(['git', 'submodule', 'init']) call(['git', 'submodule', 'update'])

Hope this helps.

miohtama commented 11 years ago

It should also make sense to check call() return value so we can detect the condition when use has no git command installed and we can show a message telling user to install command-line git first