poll_twitter not found after regular apt updates.

28 views
Skip to first unread message

Ross Laird

unread,
Nov 9, 2012, 5:40:23 PM11/9/12
to mezzani...@googlegroups.com

This is kind of weird, and tough (for me) to track down. My twitter feed has been working fine for months, running from cron, but after a recent upgrade of several packages (regular security updates, mostly), the poll_twitter command now reports "Unknown command: 'poll_twitter'". My site is working fine, and there do not seem to be any other errors. Changing the verbosity of manage.py to the maximum (i.e. "python manage.py poll_twitter --verbosity 3") shows no further debug info. So, it's difficult to know where to start. Suggestions most welcome.

Cheers.

Ross

Ross Laird

unread,
Nov 9, 2012, 6:03:47 PM11/9/12
to mezzani...@googlegroups.com
If it helps, here is the list of updates (below). As I review them, I can see that this recent upgrade involved more than a few security updates (it's actually much of my infrastructure...)

dpkg, libc-bin, libc6, libc6-i686, libc-dev-bin, libc6-dev, linux-libc-dev, tzdata, apt, lsb-base, python2.6-dev, libpython2.6, python2.6, python2.6-minimal, apt-utils, dhcp3-client, dhcp3-common, gpgv, gnupg, gnupg-curl, lsb-release, libxml2, bind9-host, dnsutils, libisc60, libdns64, libisccc60, libisccfg60, liblwres60, libbind9-60, dpkg-dev, ghostscript, libgs8, libruby1.8, ruby1.8, libreadline-ruby1.8, irb1.8, libdbus-1-3, libpq-dev, libpq5, libxslt1.1, nginx, postgresql-client-8.4, postgresql-8.4, postgresql, postgresql-contrib-8.4, postgresql-contrib, postgresql-doc-8.4, rdoc1.8, python2.6-dbg,

Josh Cartmell

unread,
Nov 9, 2012, 7:42:31 PM11/9/12
to mezzani...@googlegroups.com
At a python command prompt what happens if you type this:

from mezzanine.twitter.management.commands import poll_twitter

That should product no output, but if it does product some sort of error that might help you track down the culprit.

Ross Laird

unread,
Nov 9, 2012, 7:48:47 PM11/9/12
to mezzani...@googlegroups.com
Carrying along on my debug odyssey here:

This is a Ubuntu python-defaults upgrade bug that affects virtual environments and Python's random function.
For others who might have this problem, or a related problem, here is how you isolate this bug as the culprit:

python manage.py validate

If you get the error "cannot import name urandom", then this is the issue.

The fix is to rebuild your virtual environment, which involves replacing the current environment with one of the same name:

cd whatever
cd ..
virtualenv whatever

This fixed the issue for me. (I also backed up the old virtual environment, just in case.)

Ross Laird

unread,
Nov 9, 2012, 7:49:47 PM11/9/12
to mezzani...@googlegroups.com
Thanks for the suggestion, Josh. I was just figuring it out when your message came through.
Reply all
Reply to author
Forward
0 new messages