This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 852131 - Can't run twistd, dies with "ImportError: No module named scripts.twistd"
Can't run twistd, dies with "ImportError: No module named scripts.twistd"
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: python-twisted-core (Show other bugs)
17
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Thomas Vander Stichele
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-27 12:39 EDT by Avi Alkalay
Modified: 2012-09-11 08:57 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-11 08:57:23 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Avi Alkalay 2012-08-27 12:39:16 EDT
Simply can't run it:

$ twistd
Traceback (most recent call last):
  File "/bin/twistd", line 13, in <module>
    from twisted.scripts.twistd import run
ImportError: No module named scripts.twistd

Version is python-twisted-core-11.1.0-2.fc17.x86_64

There is a note that can be related on Twisted web site: http://twistedmatrix.com/trac/wiki/FrequentlyAskedQuestions#WhyamIgettingImportErrorsforTwistedsubpackagesonmy64bitinstallationofRedHatFedoraCentOS

So I set PYTHONPATH=/usr/lib/python2.7:/usr/lib64/python2.7 but it didn't help.

I doubt this is the expected behavior but if I'm missing something, at least some kind of documentation should be included on the package.
Comment 1 Julian Sikorski 2012-09-01 08:13:21 EDT
Seems to work here:

$ rpm -q python-twisted-core
python-twisted-core-11.1.0-2.fc17.x86_64
$ twistd
Usage: twistd [options]
Options:
      --savestats      save the Stats object rather than the text output of the
                       profiler.
  -o, --no_save        do not save state on shutdown
  -e, --encrypted      The specified tap/aos file is encrypted.
  -n, --nodaemon       don't daemonize, don't use default umask of 0077
      --originalname   Don't try to change the process name
      --syslog         Log to syslog, not to file
      --euid           Set only effective user-id rather than real user-id.
                       (This option has no effect unless the server is running
                       as root, in which case it means not to shed all
                       privileges after binding ports, retaining the option to
                       regain privileges in cases such as spawning processes.
                       Use with caution.)
  -l, --logfile=       log to a specified file, - for stdout
      --logger=        A fully-qualified name to a log observer factory to use
                       for the initial log observer. Takes precedence over
                       --logfile and --syslog (when available).
  -p, --profile=       Run in profile mode, dumping results to specified file
      --profiler=      Name of the profiler to use (profile, cprofile, hotshot).
                       [default: hotshot]
  -f, --file=          read the given .tap file [default: twistd.tap]
  -y, --python=        read an application from within a Python file (implies
                       -o)
  -s, --source=        Read an application from a .tas file (AOT format).
  -d, --rundir=        Change to a supplied directory before running [default:
                       .]
      --prefix=        use the given prefix when syslogging [default: twisted]
      --pidfile=       Name of the pidfile [default: twistd.pid]
      --chroot=        Chroot to a supplied directory before running
  -u, --uid=           The uid to run as.
  -g, --gid=           The gid to run as.
      --umask=         The (octal) file creation mask to apply.
      --help-reactors  Display a list of possibly available reactor names.
      --version        Print version information and exit.
      --spew           Print an insanely verbose log of everything that happens.
                       Useful when debugging freezes or locks in complex code.
  -b, --debug          Run the application in the Python Debugger (implies
                       nodaemon), sending SIGUSR2 will drop into debugger
  -r, --reactor=       Which reactor to use (see --help-reactors for a list of
                       possibilities)
      --help           Display this help and exit.

twistd reads a twisted.application.service.Application out of a file and runs
it.
Commands:
    ftp              An FTP server.
    inetd            An inetd(8) replacement.
    manhole-old      An interactive remote debugger service.
    portforward      A simple port-forwarder.
    socks            A SOCKSv4 proxy service.
    telnet           A simple, telnet-based remote debugging service.
    web              A general-purpose web server which can serve from a
                     filesystem or application resource.
Comment 2 Avi Alkalay 2012-09-11 08:57:23 EDT
Sorry, this is my fault. I was playing with a Python Egg that installs a twistd command and that was screwing up twistd.

This is not a bug. Closing it.

Note You need to log in before you can comment on or make changes to this bug.