Announcement Announcement Module
Collapse
No announcement yet.
Notes on install/setup bad "out of the box" experience Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Notes on install/setup bad "out of the box" experience

    I'm new to python but I have a great deal of experience with Spring in java. I have to say it's been frustrating just trying to get a trivial example to run.

    I'm not impressed that there are completely different tarballs for every version of python (except the most recent releases) but that seems to be a python weakness rather than spring python specific. Still, it doesn't give the warm fuzzy feeling. I've got production constraints that limit me to python 2.4 and it makes me very nervous about committing to using spring python in a production environment knowing that the spring python code for 2.4 is likely to suffer some dry rot.

    Then I extract the tarball and I get a ton spewage about vendor extensions used in a .tar file. I've been using tar since 1985 and never seen warnings/errors like that. It would be nice if there were a note somewhere that says whether those are of concern or not, or say "pass the --pax-option="delete=SCHILY.*" when extracting the tarball". Or better yet just distribute a standard tarball.

    That's made more annoying by the fact that when I click on the HTML documentation to see what is says about the warning messages, it pops open some tiny little fixed window in the middle of my browser that makes it impossible to read/navigate online. Apparently there's no offline version either?

    When I run setup.py it dies because I don't have easy_setup. I get that installed and discover it throws an exception if it doesn't find the package specified. Again, not spring python's fault directly but more shivers down my spine when I think about this running 24x7 in a production environment.

    dhaynes@ubuntu:~/src/springpython-samples-1.2.0.FINAL/petclinic$ sudo easy_install foo
    Searching for foo
    Reading http://pypi.python.org/simple/foo/
    No local packages or download links found for foo
    Best match: None
    Traceback (most recent call last):
    File "/usr/local/bin/easy_install", line 8, in <module>
    load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install')()
    File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1712, in main
    File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1700, in with_ei_usage
    File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1716, in <lambda>
    File "/usr/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
    File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
    File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
    File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 211, in run
    File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 434, in easy_install
    File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/package_index.py", line 475, in fetch_distribution
    AttributeError: 'NoneType' object has no attribute 'clone'

    So, I get mysqldb and cherrypy and pyro installed and when I run petclinic.py it dies with this:

    2011-08-03 19:54:41,494 - springpython.context.ApplicationContext - DEBUG - Stored object 'authenticationManager' in container's singleton storage
    2011-08-03 19:54:41,494 - springpython.context.ApplicationContext - DEBUG - Eagerly fetching filterChainProxy
    2011-08-03 19:54:41,494 - springpython.context.ApplicationContext - DEBUG - Did NOT find object 'filterChainProxy' in the singleton storage.
    2011-08-03 19:54:41,494 - springpython.context.ApplicationContext - DEBUG - Creating an instance of id=filterChainProxy props=[] scope=scope.SINGLETON factory=PythonObjectFactory(<bound method PetClinicClientAndServer.filterChainProxy of <noxml.PetClinicClientAndServer object at 0x9a50bec>>)
    2011-08-03 19:54:41,494 - springpython.factory.PythonObjectFactory - DEBUG - Creating an instance of filterChainProxy
    2011-08-03 19:54:41,494 - springpython.config.objectSingleton<function filterChainProxy at 0x9a42dbc> - (<noxml.PetClinicClientAndServer object at 0x9a50bec>,)scope.SINGLETON - DEBUG - This IS the top-level object, calling filterChainProxy().
    Traceback (most recent call last):
    File "petclinic.py", line 41, in <module>
    applicationContext = ApplicationContext(noxml.PetClinicClientAndServer( ))
    File "/usr/local/lib/python2.7/dist-packages/springpython-1.2.0.FINAL-py2.7.egg/springpython/context/__init__.py", line 45, in __init__
    self.get_object(object_def.id, ignore_abstract=True)
    File "/usr/local/lib/python2.7/dist-packages/springpython-1.2.0.FINAL-py2.7.egg/springpython/container/__init__.py", line 80, in get_object
    comp = self._create_object(object_def)
    File "/usr/local/lib/python2.7/dist-packages/springpython-1.2.0.FINAL-py2.7.egg/springpython/container/__init__.py", line 129, in _create_object
    self._get_constructors_kw(object_def.named_constr) )
    File "/usr/local/lib/python2.7/dist-packages/springpython-1.2.0.FINAL-py2.7.egg/springpython/factory/__init__.py", line 62, in create_object
    return self.method()
    File "<string>", line 2, in filterChainProxy
    File "/usr/local/lib/python2.7/dist-packages/springpython-1.2.0.FINAL-py2.7.egg/springpython/config/_python_config.py", line 141, in object_wrapper
    return _object_wrapper(f, theScope, parent, log_func_name, *args, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/springpython-1.2.0.FINAL-py2.7.egg/springpython/config/_python_config.py", line 121, in _object_wrapper
    return _deco(f, scope, parent, log_func_name, *args, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/springpython-1.2.0.FINAL-py2.7.egg/springpython/config/_python_config.py", line 116, in _deco
    results = f(*args, **kwargs)
    File "/home/dhaynes/src/springpython-samples-1.2.0.FINAL/petclinic/cherrypy/noxml.py", line 237, in filterChainProxy
    "filterSecurityInterceptor"])
    File "/usr/local/lib/python2.7/dist-packages/springpython-1.2.0.FINAL-py2.7.egg/springpython/security/cherrypy3.py", line 30, in __init__
    cherrypy.tools.securityFilterChain = cherrypy._cptools.HandlerTool(self)
    AttributeError: 'module' object has no attribute '_cptools'
    2011-08-03 19:54:41,496 - springpython.context.ApplicationContext - DEBUG - Invoking the destroy_method on registered objects
    2011-08-03 19:54:41,496 - springpython.context.ApplicationContext - DEBUG - Successfully invoked the destroy_method on registered objects

    I'm assuming it's something to do with the version of cherrypy that Ubuntu apt-get selected or PYTHON_PATH or something but by now I'm not really interested. I'll create my own sandbox and figure out how to use it on my own.

    I'm taking the time to document the issues I encountered because I can't see Spring python gaining any converts to using a DI framework without a "hello world" example that the average new-to-python programmer can build and run in 5 minutes or less.

    Without converts, the code doesn't get tested as thoroughly and without thorough testing of the code, my job gets more difficult.

    I know it's open source, but I can't help thinking "if you want me to buy the book then give me a reason to stake my project on the product".

    I already know Spring, so if I'm going to have to work out everything just to get the examples running then I'm not going to need the book, am I? On the other hand if I use spring python in the project, the other developers will be seeing DI for the first time and they might buy the book.

    A bit grumpy but hopefully helpful notes.

    NOW GET OFF MY LAWN YOU ROTTEN KIDS!

    Regards

    Dan

  • #2
    Please read my responses in line:
    Originally posted by dphaynes View Post
    I'm new to python but I have a great deal of experience with Spring in java. I have to say it's been frustrating just trying to get a trivial example to run.

    I'm not impressed that there are completely different tarballs for every version of python (except the most recent releases) but that seems to be a python weakness rather than spring python specific. Still, it doesn't give the warm fuzzy feeling. I've got production constraints that limit me to python 2.4 and it makes me very nervous about committing to using spring python in a production environment knowing that the spring python code for 2.4 is likely to suffer some dry rot.
    I'm not sure I understand your point. Spring Python only has one tarball, not one for each version of python. This can be viewed in the download records going back to version 0.7. There is a separate tarball for the samples and also for one plugin. But spring python core is a single tarball.

    Originally posted by dphaynes View Post
    Then I extract the tarball and I get a ton spewage about vendor extensions used in a .tar file. I've been using tar since 1985 and never seen warnings/errors like that. It would be nice if there were a note somewhere that says whether those are of concern or not, or say "pass the --pax-option="delete=SCHILY.*" when extracting the tarball". Or better yet just distribute a standard tarball.
    I don't know what to say. I have been using tar tools on ubuntu linux for several years as well as mac osx, and never seen these types of errors. I execute "tar xvfz springpython-<version>.tar.gz" and it works just fine.

    Originally posted by dphaynes View Post
    That's made more annoying by the fact that when I click on the HTML documentation to see what is says about the warning messages, it pops open some tiny little fixed window in the middle of my browser that makes it impossible to read/navigate online. Apparently there's no offline version either?
    Are you referring to http://static.springsource.org/sprin...ml/index.html? When I view that page through Chrome and Firefox, I don't see any pop-ups. Again, I don't know what to say. Are you sure you are viewing the official site and not some other site's clone copy?

    Originally posted by dphaynes View Post
    When I run setup.py it dies because I don't have easy_setup. I get that installed and discover it throws an exception if it doesn't find the package specified. Again, not spring python's fault directly but more shivers down my spine when I think about this running 24x7 in a production environment.

    dhaynes@ubuntu:~/src/springpython-samples-1.2.0.FINAL/petclinic$ sudo easy_install foo
    Searching for foo
    Reading http://pypi.python.org/simple/foo/
    No local packages or download links found for foo
    Best match: None
    Traceback (most recent call last):
    File "/usr/local/bin/easy_install", line 8, in <module>
    load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install')()
    File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1712, in main
    File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1700, in with_ei_usage
    File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1716, in <lambda>
    File "/usr/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
    File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
    File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
    File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 211, in run
    File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 434, in easy_install
    File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/package_index.py", line 475, in fetch_distribution
    AttributeError: 'NoneType' object has no attribute 'clone'

    So, I get mysqldb and cherrypy and pyro installed and when I run petclinic.py it dies with this:

    2011-08-03 19:54:41,494 - springpython.context.ApplicationContext - DEBUG - Stored object 'authenticationManager' in container's singleton storage
    2011-08-03 19:54:41,494 - springpython.context.ApplicationContext - DEBUG - Eagerly fetching filterChainProxy
    2011-08-03 19:54:41,494 - springpython.context.ApplicationContext - DEBUG - Did NOT find object 'filterChainProxy' in the singleton storage.
    2011-08-03 19:54:41,494 - springpython.context.ApplicationContext - DEBUG - Creating an instance of id=filterChainProxy props=[] scope=scope.SINGLETON factory=PythonObjectFactory(<bound method PetClinicClientAndServer.filterChainProxy of <noxml.PetClinicClientAndServer object at 0x9a50bec>>)
    2011-08-03 19:54:41,494 - springpython.factory.PythonObjectFactory - DEBUG - Creating an instance of filterChainProxy
    2011-08-03 19:54:41,494 - springpython.config.objectSingleton<function filterChainProxy at 0x9a42dbc> - (<noxml.PetClinicClientAndServer object at 0x9a50bec>,)scope.SINGLETON - DEBUG - This IS the top-level object, calling filterChainProxy().
    Traceback (most recent call last):
    File "petclinic.py", line 41, in <module>
    applicationContext = ApplicationContext(noxml.PetClinicClientAndServer( ))
    File "/usr/local/lib/python2.7/dist-packages/springpython-1.2.0.FINAL-py2.7.egg/springpython/context/__init__.py", line 45, in __init__
    self.get_object(object_def.id, ignore_abstract=True)
    File "/usr/local/lib/python2.7/dist-packages/springpython-1.2.0.FINAL-py2.7.egg/springpython/container/__init__.py", line 80, in get_object
    comp = self._create_object(object_def)
    File "/usr/local/lib/python2.7/dist-packages/springpython-1.2.0.FINAL-py2.7.egg/springpython/container/__init__.py", line 129, in _create_object
    self._get_constructors_kw(object_def.named_constr) )
    File "/usr/local/lib/python2.7/dist-packages/springpython-1.2.0.FINAL-py2.7.egg/springpython/factory/__init__.py", line 62, in create_object
    return self.method()
    File "<string>", line 2, in filterChainProxy
    File "/usr/local/lib/python2.7/dist-packages/springpython-1.2.0.FINAL-py2.7.egg/springpython/config/_python_config.py", line 141, in object_wrapper
    return _object_wrapper(f, theScope, parent, log_func_name, *args, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/springpython-1.2.0.FINAL-py2.7.egg/springpython/config/_python_config.py", line 121, in _object_wrapper
    return _deco(f, scope, parent, log_func_name, *args, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/springpython-1.2.0.FINAL-py2.7.egg/springpython/config/_python_config.py", line 116, in _deco
    results = f(*args, **kwargs)
    File "/home/dhaynes/src/springpython-samples-1.2.0.FINAL/petclinic/cherrypy/noxml.py", line 237, in filterChainProxy
    "filterSecurityInterceptor"])
    File "/usr/local/lib/python2.7/dist-packages/springpython-1.2.0.FINAL-py2.7.egg/springpython/security/cherrypy3.py", line 30, in __init__
    cherrypy.tools.securityFilterChain = cherrypy._cptools.HandlerTool(self)
    AttributeError: 'module' object has no attribute '_cptools'
    2011-08-03 19:54:41,496 - springpython.context.ApplicationContext - DEBUG - Invoking the destroy_method on registered objects
    2011-08-03 19:54:41,496 - springpython.context.ApplicationContext - DEBUG - Successfully invoked the destroy_method on registered objects
    This appears to be easy_install for python2.7. You said earlier you are running this against python 2.4. A) Spring Python requires Python 2.6+, so you need to download SP 1.1. B) You need to install the correct version of setuptools for the version of python you are using. I can't help it if that project has different versions based on the version of python you are using. You also need to follow their directions on installing setuptools. I believe it's a self-extracting archive. C) I can't tell which version of CherryPy you installed. We are integrated with CherryPy3.

    Originally posted by dphaynes View Post
    I'm assuming it's something to do with the version of cherrypy that Ubuntu apt-get selected or PYTHON_PATH or something but by now I'm not really interested. I'll create my own sandbox and figure out how to use it on my own.

    I'm taking the time to document the issues I encountered because I can't see Spring python gaining any converts to using a DI framework without a "hello world" example that the average new-to-python programmer can build and run in 5 minutes or less.

    Without converts, the code doesn't get tested as thoroughly and without thorough testing of the code, my job gets more difficult.

    I know it's open source, but I can't help thinking "if you want me to buy the book then give me a reason to stake my project on the product".

    I already know Spring, so if I'm going to have to work out everything just to get the examples running then I'm not going to need the book, am I? On the other hand if I use spring python in the project, the other developers will be seeing DI for the first time and they might buy the book.

    A bit grumpy but hopefully helpful notes.

    NOW GET OFF MY LAWN YOU ROTTEN KIDS!

    Regards

    Dan
    I'm sorry things have been rough. You have made an excellent point that documentation pages should include some installation steps. I have made such changes. It will take a little time to make it to the web pages. You can track this effort at https://jira.springsource.org/browse...NGPYTHONPY-161. One of the points I added to the documentation is the recommendation to NOT install python libraries using things like apt-get. You run the risk of the OS deciding its time to upgrade that library when you may not be ready for it.

    Comment


    • #3
      Updates have made it to the website. For Spring Python 1.2, see http://static.springsource.org/sprin...l#installation. Spring Python 1.1's docs are based on a certain branch and aren't updated as frequently, but you should get the idea.

      Comment

      Working...
      X