WebFaction
Community site: login faq

I'm trying to run a Django-dependent Python script in cron and get the following:

ImportError: No module named memcache

My path looks like this:

sys.path.append('/home/myusername/webapps/myappname/lib/python2.7') sys.path.append('/home/myusername/webapps/myappname/lib/python2.7/python_memcached-1.48-py2.7.egg')

Seems I'm missing something else, but at a loss of what.

Any hints?

asked 15 Nov '14, 21:28

ccuilla
1129
accept rate: 0%


Does the script work when you run it in shell?

Try to echo the sys.path when it is being ran from cron vs shell and compare the sys.path values?

permanent link

answered 15 Nov '14, 22:27

johns
5.4k312
accept rate: 23%

That helped. Sorta of a duh moment. Thanks.

(16 Nov '14, 05:18) ccuilla
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×909
×337
×81
×4

question asked: 15 Nov '14, 21:28

question was seen: 2,485 times

last updated: 16 Nov '14, 05:18

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM