Seems like I found a workaround, which is to modify compat.py to look like 
that:

import inspect
# import platform
import sys
import types

# if platform.system() == 'Windows': # pragma: no cover
if sys.platform.startswith('win'):
WIN = True
else: # pragma: no cover
WIN = False

With this I still seem to get IOError, but script doesn't stop, and runs 
fine, giving me output. 

Any idea, why the original code uses platform.system?



W dniu poniedziałek, 18 lutego 2013 21:20:13 UTC+1 użytkownik Grzegorz 
Śliwiński napisał:
>
> Hello,
> I'm running into problems, when I try to run pyramid script outputing an 
> xml for sphinx to index. Whenever I run manually, I get expected results, 
> which is printed xml. But when I try to index, I get this error:
>
> Traceback (most recent call last):
>   File "/home/webadmin/.virtualenv/v/bin/pipeline_pipe", line 8, in 
> <module>
>   load_entry_point(code==0.1.0a', 'console_scripts', 'pipe')()
>   File 
> "/home/webadmin/.virtualenv/v/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py",
>  
> line 318, in load_entry_point
>   File 
> "/home/webadmin/.virtualenv/v/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py",
>  
> line 2221, in load_entry_point
>   File 
> "/home/webadmin/.virtualenv/v/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py",
>  
> line 1954, in load
>   File 
> "/home/webadmin/workspace/services/code/code/scripts/pipelines/pipeline.py", 
> line 9, in <module>
> import pyramid.paster
>   File 
> "/home/webadmin/.virtualenv/v/lib/python2.6/site-packages/pyramid-1.4-py2.6.egg/pyramid/paster.py",
>  
> line 8, in <module>
> from pyramid.compat import configparser
>   File 
> "/home/webadmin/.virtualenv/v/lib/python2.6/site-packages/pyramid-1.4-py2.6.egg/pyramid/compat.py",
>  
> line 6, in <module>
> if platform.system() == 'Windows': # pragma: no cover
> File "/usr/lib64/python2.6/platform.py", line 1295, in system
> return uname()[0]
> File "/usr/lib64/python2.6/platform.py", line 1262, in uname
> processor = _syscmd_uname('-p','')
> File "/usr/lib64/python2.6/platform.py", line 1019, in _syscmd_uname
> rc = f.close()
> IOError: [Errno 10] No child processes
>
> I've got it some time ago as well (I had an ordinary script within pyramid 
> project), but then I just moved the app initialisation script from 
> __init__.py to app.py so it will not try to import anything pyramid, while 
> running this script. Right now I want to rearange this script so i can use 
> pyramid's config in it, and same database access, but I have no clue why I 
> get these errors....
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to