0

I'm installing a project. I run theses commands but the 4th always give me this error...

  • python setup.py develop

  • python setup.py bdist_egg (create .egg)

  • paster setup-app development.ini (create devdata.db)

  • paster shell development.ini

    (tg2) root@istc-test:/var/www/tg2/tg2# paster shell development.ini
    Traceback (most recent call last):
      File "/var/www/tg2/bin/paster", line 11, in <module>
        sys.exit(run())
      File "/var/www/tg2/local/lib/python2.7/site-packages/paste/script/command.py", line 102, in run
        invoke(command, command_name, options, args[1:])
      File "/var/www/tg2/local/lib/python2.7/site-packages/paste/script/command.py", line 141, in invoke
        exit_code = runner.run(args)
      File "/var/www/tg2/local/lib/python2.7/site-packages/paste/script/command.py", line 236, in run
        result = self.command()
      File "/var/www/tg2/local/lib/python2.7/site-packages/pylons/commands.py", line 499, in command
        request_id = int(tresponse.body)
    

    ValueError: invalid literal for int() with base 10: 'DONE'

I really dont know what to do... when I import paste.script.command it works

Thank you for your help

Dimitri
  • 33
  • 8
  • 1
    Your `run()` command is returning the string `DONE`, but it's expected to return a number to be used as operating system exit status. (By convention, when a use case is successful that number should be `0`; errors should be assigned 7-bit-clean integer values). – Charles Duffy Aug 22 '17 at 14:37
  • Yes I totally agree, but this is module file, not my code... 'PasteScript==2.0.2','console_scripts','paster' __requires__ = 'PasteScript==2.0.2' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) sys.exit( load_entry_point('PasteScript==2.0.2', 'console_scripts', 'paster')() ) – Dimitri Aug 22 '17 at 14:49
  • `python setup.py develop` in what source tree? There's more needed to reproduce this than just what's given in your question. The string `DONE` isn't present in the PasteScript source tree, so it's clearly not coming *just* from there. One of its dependencies, maybe, but tracking that down will be easier with a [mcve]. – Charles Duffy Aug 22 '17 at 15:11
  • what is source three ? I'm in python 2.7 and here is my setup.py file : name='istc', version='0.3', description='', author='', author_email='', #url='', install_requires=[ "TurboGears2 >= 2.0b7", "Catwalk >= 2.0.2", "Babel >=0.9.4", "toscawidgets >= 0.9.7.1", "zope.sqlalchemy >= 0.4 ", "repoze.tm2 >= 1.0a4", ], setup_requires=["PasteScript >= 1.7"], paster_plugins=['PasteScript', 'Pylons', 'TurboGears2', 'tg.devtools'], – Dimitri Aug 23 '17 at 07:29
  • "in what source tree" meaning *yours*. If creating that `setup.py` is both necessary and sufficient to reproduce the bug, [edit] it into your question (after testing the above condition to be true). – Charles Duffy Aug 23 '17 at 11:37

1 Answers1

1

If you are installing a TurboGears project prior to 2.3 the dependency management was mostly demanded to the project itself and you were required to use a private index to have reproducible installs of the project.

Make sure you install your environment with $ easy_install -i http://www.turbogears.org/2.2/downloads/current/index tg.devtools and only after you run python setup.py develop in your project. Otherwise you will end up with an environment that has totally incompatible packages.

NOTE: Replace 2.2 with 2.1 if you need a prior TG version for your project to work

amol
  • 1,771
  • 1
  • 11
  • 15