graphite
graphite copied to clipboard
"ImportError: No module named fields" when install
Hi,
suddenly the cookbook started giving this kind of error when running:
* execute[python manage.py syncdb --noinput] action run
================================================================================
Error executing action `run` on resource 'execute[python manage.py syncdb --noinput]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of python manage.py syncdb --noinput ----
STDOUT:
STDERR: ImportError: No module named fields
---- End output of python manage.py syncdb --noinput ----
Ran python manage.py syncdb --noinput returned 1
I tried to run the command by hand and I can get:
/opt/graphite/webapp/graphite# python manage.py syncdb --noinput ImportError: No module named fields
Cookbook version is 1.0.2 and OS is Ubuntu 14.04.2 LTS.
Anyone else experiencing this?
I have an older setup which was previously installed fine; just did a quick pip- check; the old setup has django-tagging (0.3.6) but the new - broken one - has django-tagging (0.4)...
https://pypi.python.org/pypi/django-tagging - django-tagging 0.4 requires newer django and we still have 1.5.5 on the setup...
We just ran into the same issue. CentOS 6.6, cookbook version 1.0.2.
Hi,
Yep same issue using Ubuntu 14.04, cookbook version 1.0.2
================================================================================
Error executing action `run` on resource 'execute[python manage.py syncdb --noinput]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of python manage.py syncdb --noinput ----
STDOUT:
STDERR: ImportError: No module named fields
---- End output of python manage.py syncdb --noinput ----
Ran python manage.py syncdb --noinput returned 1
Cookbook Trace:
---------------
/home/vagrant/chef-solo/cookbooks-2/lxc/libraries/monkey.rb:20:in `monkey_shell_out!'
Resource Declaration:
---------------------
# In /home/vagrant/chef-solo/cookbooks-3/graphite-config/recipes/single_node.rb
76: execute "python manage.py syncdb --noinput" do
77: user node['graphite']['user']
78: group node['graphite']['group']
79: cwd "#{base_dir}/webapp/graphite"
80: creates "#{storage_dir}/graphite.db"
81: notifies :run, "python[set admin password]"
82: end
83:
Compiled Resource:
------------------
# Declared in /home/vagrant/chef-solo/cookbooks-3/graphite-config/recipes/single_node.rb:76:in `from_file'
execute("python manage.py syncdb --noinput") do
action "run"
retries 0
retry_delay 2
default_guard_interpreter :execute
command "python manage.py syncdb --noinput"
backup 5
creates "/opt/graphite/storage/graphite.db"
cwd "/opt/graphite/webapp/graphite"
group "graphite"
returns 0
user "graphite"
declared_type :execute
cookbook_name :"graphite-config"
recipe_name "single_node"
end
I got around this temporarily reopening the resource in the recipe for my wrapper cookbook (simplified below):
r = resources(python_pip: 'django-tagging')
r.action :install
r.version "0.3.6"
and it's able to complete the syncdb operation. Hopefully someone finds it a helpful starting point until the issue is resolved upstream.
Temporary solution in Chef,
python_pip "django-tagging" do
version "0.3.6"
end
Or manually,
pip install django-tagging==0.3.6
This is an issue here as well, on Ubuntu 14.04.
@bobhlo: The chef solution above didn't work for me but the manual one did. Thanks!
@rambler just put
include_recipe 'python::pip'
before
python_pip "django-tagging" do
version "0.3.6"
end
@rambler, may need to remove newer version before applying old one
python_pip "django-tagging" do
action :remove
end
python_pip "django-tagging" do
version "0.3.6"
end
+1 - any chance of this being fixed?
Yes. I have also encountered and verified the suggested solution. We will try and get this fixed and release soon.
Friendly reminder that over 4 months have passed.
@bobhlo - "pip install django-tagging==0.3.6"
Thank you for the manual fix. It worked for me.
Marking stale due to inactivity. Remove stale label or comment or this will be closed in 7 days. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.