Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.
This repository was archived by the owner on Feb 2, 2024. It is now read-only.

Getting the following error when running Rocket==1.2.8 #7

Open

Description

@XiaonuoGantan
Traceback (most recent call last):
  File "/opt/ev/api/rocket_app.py", line 5, in <module>
    server = Rocket(('0.0.0.0', 6555), 'wsgi', {"wsgi_app": main_app()}, min_threads=4, max_threads=0)
  File "/opt/ev/venv/local/lib/python2.7/site-packages/rocket/main.py", line 74, in __init__
    self._threadpool = ThreadPool(get_method(method),
  File "/opt/ev/venv/local/lib/python2.7/site-packages/rocket/worker.py", line 400, in get_method
    from .methods.wsgi import WSGIWorker
ImportError: No module named methods.wsgi

Activity

  1. conleym commented on Dec 13, 2017

    @conleym

    The package on pypi is missing the methods module. Downloaded directly, unarchived:

    ➜  Rocket-1.2.8 ll
    total 16
    -rw-r--r--@  1 mike  staff   1.4K Dec  3 23:10 PKG-INFO
    drwxr-xr-x@ 11 mike  staff   374B Dec  3 23:10 rocket
    -rwxr-xr-x@  1 mike  staff   2.1K Dec  3 23:08 setup.py
    ➜  Rocket-1.2.8 cd rocket 
    ➜  rocket ll
    total 128
    -rw-r--r--@ 1 mike  staff   2.4K Dec  3 23:09 __init__.py
    -rw-r--r--@ 1 mike  staff   2.7K Nov  4 14:34 connection.py
    -rw-r--r--@ 1 mike  staff   3.1K Nov  4 14:34 filelike.py
    -rw-r--r--@ 1 mike  staff   3.1K Nov  4 14:34 futures.py
    -rw-r--r--@ 1 mike  staff   5.7K Nov  4 14:34 listener.py
    -rw-r--r--@ 1 mike  staff   6.6K Nov  4 14:34 main.py
    -rw-r--r--@ 1 mike  staff   5.3K Nov  4 14:34 monitor.py
    -rw-r--r--@ 1 mike  staff   4.7K Nov  4 14:34 threadpool.py
    -rw-r--r--@ 1 mike  staff    13K Nov  4 14:34 worker.py
    
  2. ichux commented on Feb 14, 2018

    @ichux

    python -V == Python 3.6.3

    pip install rocket

    Collecting rocket
      Downloading Rocket-1.2.8.tar.gz
    Collecting distribute (from rocket)
      Downloading distribute-0.7.3.zip (145kB)
        100% |████████████████████████████████| 153kB 349kB/s 
        Complete output from command python setup.py egg_info:
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/private/var/folders/0j/qzfh030947qfglfmc4ncyslm0000gn/T/pip-build-etfbzbm3/distribute/setuptools/__init__.py", line 2, in <module>
            from setuptools.extension import Extension, Library
          File "/private/var/folders/0j/qzfh030947qfglfmc4ncyslm0000gn/T/pip-build-etfbzbm3/distribute/setuptools/extension.py", line 5, in <module>
            from setuptools.dist import _get_unpatched
          File "/private/var/folders/0j/qzfh030947qfglfmc4ncyslm0000gn/T/pip-build-etfbzbm3/distribute/setuptools/dist.py", line 7, in <module>
            from setuptools.command.install import install
          File "/private/var/folders/0j/qzfh030947qfglfmc4ncyslm0000gn/T/pip-build-etfbzbm3/distribute/setuptools/command/__init__.py", line 8, in <module>
            from setuptools.command import install_scripts
          File "/private/var/folders/0j/qzfh030947qfglfmc4ncyslm0000gn/T/pip-build-etfbzbm3/distribute/setuptools/command/install_scripts.py", line 3, in <module>
            from pkg_resources import Distribution, PathMetadata, ensure_directory
          File "/private/var/folders/0j/qzfh030947qfglfmc4ncyslm0000gn/T/pip-build-etfbzbm3/distribute/pkg_resources.py", line 1518, in <module>
            register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
        AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
        
        ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/0j/qzfh030947qfglfmc4ncyslm0000gn/T/pip-build-etfbzbm3/distribute/
    
  3. mds2 commented on Sep 14, 2018

    @mds2

    For what it's worth, I tried installing rocket from source using sudo python setup.py install and, just as in the bug described here, it also failed to copy over the methods folder

  4. mds2 commented on Sep 14, 2018

    @mds2

    I think I have a fix

    diff --git a/setup.py b/setup.py
    index 22dcf9b..81744f8 100755
    --- a/setup.py
    +++ b/setup.py
    @@ -25,7 +25,7 @@ setup(name = "Rocket",
           url = "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/explorigin/Rocket",
           packages = ['rocket'],
           license = "MIT License",
    -      package_data = {'':['*.py', '*.txt']},
    +      package_data = {'':['*.py', '*.txt', 'methods/*.py']},
           include_package_data = True,
           install_requires=['distribute'],
           long_description = """The Rocket web server is a server designed to handle the increased needs of modern web applications implemented in pure Python. It can serve WSGI applications and middleware currently with the ability to be extended to handle different types of networked request-response jobs. Rocket runs on cPython 2.5-3.x and Jython 2.5 (without the need to run through the 2to3 translation tool). Rocket is similar in purpose to Cherrypy's Wsgiserver but with added flexibility and concurrency.
    

    Should I fork the project and submit this as a patch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions