RE: UNS: Re: cleaner ToscaWidgets and descending into pylons version of dll hell

2007-10-24 Thread John_Nowlan

Now trying to do the tutorial:

(note: I had to update to python25 from 24 on windows because in trying
to do the tutorial I was getting an error about a missing python25.dll
after updating dependent packages (PasteDeploy-1.3.1, Beaker-0.8,
Webhelpers-0.3.2, Routes-1.7). Updating to 25 without changing path
fixed that problem.)

paster create -t Pylons TWTutorial - should be -paster create -t
pylons TWTutorial
- lowercase pylons not Pylons
- otherwise you get 'LookupError: Template by name 'Pylons' not found'

- make the first few code changes, get to the first paster serve..:

C:\Inetpub\pylonshome\TWTutorialpaster serve --reload development.ini
Starting subprocess with file monitor
Traceback (most recent call last):
  File C:\Python24\scripts\paster-script.py, line 7, in ?
sys.exit(
  File
c:\python24\lib\site-packages\PasteScript-1.3.6-py2.4.egg\paste\script\
command.py, line 78, in run
invoke(command, command_name, options, args[1:])
  File
c:\python24\lib\site-packages\PasteScript-1.3.6-py2.4.egg\paste\script\
command.py, line 117, in invoke
exit_code = runner.run(args)
  File
c:\python24\lib\site-packages\PasteScript-1.3.6-py2.4.egg\paste\script\
command.py, line 212, in run
result = self.command()
  File
c:\python24\lib\site-packages\PasteScript-1.3.6-py2.4.egg\paste\script\
serve.py, line 227, in command
relative_to=base, global_conf=vars)
  File
c:\python24\lib\site-packages\PasteScript-1.3.6-py2.4.egg\paste\script\
serve.py, line 248, in loadapp
return loadapp(
  File
c:\python24\lib\site-packages\PasteDeploy-1.3.1-py2.4.egg\paste\deploy\
loadwsgi.py, line 193, in loadapp
return loadobj(APP, uri, name=name, **kw)
  File
c:\python24\lib\site-packages\PasteDeploy-1.3.1-py2.4.egg\paste\deploy\
loadwsgi.py, line 213, in loadobj
global_conf=global_conf)
  File
c:\python24\lib\site-packages\PasteDeploy-1.3.1-py2.4.egg\paste\deploy\
loadwsgi.py, line 237, in loadcontext
global_conf=global_conf)
  File
c:\python24\lib\site-packages\PasteDeploy-1.3.1-py2.4.egg\paste\deploy\
loadwsgi.py, line 267, in _loadconfig
return loader.get_context(object_type, name, global_conf)
  File
c:\python24\lib\site-packages\PasteDeploy-1.3.1-py2.4.egg\paste\deploy\
loadwsgi.py, line 393, in get_context
section)
  File
c:\python24\lib\site-packages\PasteDeploy-1.3.1-py2.4.egg\paste\deploy\
loadwsgi.py, line 414, in _context_from_use
context = self.get_context(
  File
c:\python24\lib\site-packages\PasteDeploy-1.3.1-py2.4.egg\paste\deploy\
loadwsgi.py, line 345, in get_context
global_conf=global_conf)
  File
c:\python24\lib\site-packages\PasteDeploy-1.3.1-py2.4.egg\paste\deploy\
loadwsgi.py, line 237, in loadcontext
global_conf=global_conf)
  File
c:\python24\lib\site-packages\PasteDeploy-1.3.1-py2.4.egg\paste\deploy\
loadwsgi.py, line 274, in _loadegg
return loader.get_context(object_type, name, global_conf)
  File
c:\python24\lib\site-packages\PasteDeploy-1.3.1-py2.4.egg\paste\deploy\
loadwsgi.py, line 541, in get_context
entry_point, protocol, ep_name = self.find_egg_entry_point(
  File
c:\python24\lib\site-packages\PasteDeploy-1.3.1-py2.4.egg\paste\deploy\
loadwsgi.py, line 568, in find_egg_entry_point
possible.append((entry.load(), protocol, entry.name))
  File
C:\Python24\lib\site-packages\setuptools-0.6c5-py2.4.egg\pkg_resources.
py, line 1830, in load
entry = __import__(self.module_name, globals(),globals(),
['__name__'])
  File
C:\Inetpub\pylonshome\TWTutorial\twtutorial\config\middleware.py, line
8, in ?
from pylons.error import error_template
  File
c:\python24\lib\site-packages\Pylons-0.9.6.1-py2.4.egg\pylons\error.py
, line 14, in ?
from paste.evalexception.middleware import *
  File
c:\python24\lib\site-packages\Paste-1.5.1-py2.4.egg\paste\evalexception
\__init__.py, line 6, in ?
from paste.evalexception.middleware import EvalException
  File
c:\python24\lib\site-packages\Paste-1.5.1-py2.4.egg\paste\evalexception
\middleware.py, line 36, in ?
from paste.exceptions import errormiddleware, formatter, collector
  File
c:\python24\lib\site-packages\Paste-1.5.1-py2.4.egg\paste\exceptions\er
rormiddleware.py, line 14, in ?
from paste.exceptions import formatter, collector, reporter
  File
c:\python24\lib\site-packages\Paste-1.5.1-py2.4.egg\paste\exceptions\re
porter.py, line 8, in ?
from socket import sslerror
ImportError: cannot import name sslerror

stuck :(


So I try on a development unix box. (Fits in with the split
personality...)
Have to update setuptools...
and ...

$ easy_install twForms
Searching for twForms
Reading http://www.pylonshq.com/download/
Reading http://pypi.python.org/simple/twForms/
Reading http://toscawidgets.org
Reading http://toscawidgets.org/download
Best match: twForms 0.1a2dev-r3508
Downloading
http://toscawidgets.org/download/twForms-0.1a2dev-r3508.tar.gz
Processing twForms-0.1a2dev-r3508.tar.gz
Running twForms-0.1a2dev-r3508/setup.py -q bdist_egg --dist-dir

Re: UNS: Re: cleaner ToscaWidgets and descending into pylons version of dll hell

2007-10-24 Thread Alberto Valverde

John_Nowlan wrote:
 Now trying to do the tutorial:
 
 (note: I had to update to python25 from 24 on windows because in trying
 to do the tutorial I was getting an error about a missing python25.dll
 after updating dependent packages (PasteDeploy-1.3.1, Beaker-0.8,
 Webhelpers-0.3.2, Routes-1.7). Updating to 25 without changing path
 fixed that problem.)

Hmmm, I'm not sure what might be causing this but at this point it
doesn't look TW related. Can't help you much here really since I have no
experience with pylons on windows.

 
 paster create -t Pylons TWTutorial - should be -paster create -t
 pylons TWTutorial
 - lowercase pylons not Pylons
 - otherwise you get 'LookupError: Template by name 'Pylons' not found'

Noticed and fixed that...

 
 - make the first few code changes, get to the first paster serve..:
 
 ( long traceback )


 ImportError: cannot import name sslerror
 
 stuck :(

Hmmm, looks something related to Paste's httpserver. AFAIK, it's the
only place where ssl related stuff is imported in Pylons' dependencies.

 So I try on a development unix box. (Fits in with the split
 personality...)
 Have to update setuptools...
 and ...
 
 $ easy_install twForms
 (.)
 ld: fatal: library -lpython2.5: not found
 ld: fatal: File processing errors. No output written to
 build/lib.solaris-2.9-sun4u-2.5/dispatch/_d_speedups.so
 error: Setup script exited with error: command '/import/bin/cc' failed
 with exit status 1

I have no experience with Solaris but it seems the linker can't locate
python's shared library. Setting some environment variable should do the
trick... You will also need python's header files somewhere the compiler
can find them too.

 So I'm stuck and maybe should be starting a new thread about what seems
 to me to be a pylons version of dll hell. But its probably my own
 inexperience.

Don't blame Pylons, it's TW's fault here... TW depends on a third-party
library (RuleDispatch) which is not pure python (ie: has C coded modules
for performance). You're not the first person being bitten by that :(

I plan to fix this some time soon by dropping that dependency
altogether...

For the meantime, I've built those troublesome eggs without the C
speedups and uploaded them at toscawidgets.org. Can you try installing
RuleDispatch before installing twForms/ToscaWidgets like this:

easy_install -f http://toscawidgets.org/download/wo_speedups RuleDispatch

(all in the same line)

If it works please report back so I can mention it in the tutorial :)

 
 I've just been doing easy_install -U pylons to get to 0.9.6.1 and
 updating packages as nescessary. Perhaps its better to delete everything
 and do a 'clean' easy_install pylons to try and make sure all packages
 are at the required levels?
 
 Does anyone have words of wisdom about installing pylons, python
 packages? I.e. does it make sense to clean out old versions or what are
 'best practices'?

I'd recommend using virtualenv or workingenv to create a sandbox to
install libraries. When it breaks badly I just wipe the sandbox away and
start over again (crude but works :) Note that you will not want to do
this in a production environment unless you have backups of all eggs
with the versions you know that work since it's sometimes hard to find
the exact outdated version of a library.

 Although looking at this again the unix problem is prolly a env problem,
 i.e. need to solve -lpython2.5: not found

The easy_install workaround I gave a few lines back should get you
going... however, this is going to bite you again whenever you try to
install a library that has C speedups and no pre-compiled library for
your platform so I'd recommend taking the time to fix it some time.

Alberto

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~--~~~~--~~--~--~---