Ticket #909: python2.6_errors.txt

File python2.6_errors.txt, 5.3 KB (added by loic_le.ninan, 10 years ago)

After trying a fresh install, the Pyld issue seems to be resolved. However setup.py ends with errors and one test is failing on my system. See attached file for trace and more.

Line 
1
2Installing MediaGoblin with Python 2.6
3======================================
4
5$ python --version
6Python 2.6.6
7
8[... git clone, cd mediagoblin, git submodule, virtualenv ...]
9
10$ ./bin/python --version
11Python 2.6.6
12
13$ ./bin/python setup.py develop
14[...]
15Finished processing dependencies for mediagoblin==0.6.2.dev
16Error in atexit._run_exitfuncs:
17Traceback (most recent call last):
18 File "/usr/lib/python2.6/atexit.py", line 24, in _run_exitfuncs
19 func(*targs, **kargs)
20 File "/usr/lib/python2.6/multiprocessing/util.py", line 258, in _exit_function
21 info('process shutting down')
22TypeError: 'NoneType' object is not callable
23Error in sys.exitfunc:
24Traceback (most recent call last):
25 File "/usr/lib/python2.6/atexit.py", line 24, in _run_exitfuncs
26 func(*targs, **kargs)
27 File "/usr/lib/python2.6/multiprocessing/util.py", line 258, in _exit_function
28 info('process shutting down')
29TypeError: 'NoneType' object is not callable
30
31$ ./bin/gmg dbupdate
32[...]
33
34
35
36Running tests
37=============
38
39
40$ ./runtests.sh
41Using ./bin/py.test
42+ exec ./bin/py.test ./mediagoblin/tests --boxed
43============================= test session starts ==============================
44platform linux2 -- Python 2.6.6 -- py-1.4.20 -- pytest-2.5.2
45plugins: xdist
46collected 130 items / 2 skipped
47
48mediagoblin/tests/test_api.py ..
49mediagoblin/tests/test_auth.py ...
50mediagoblin/tests/test_basic_auth.py ...
51mediagoblin/tests/test_celery_setup.py .
52mediagoblin/tests/test_collections.py .
53mediagoblin/tests/test_config.py ..
54mediagoblin/tests/test_csrf_middleware.py ...
55mediagoblin/tests/test_edit.py ....
56mediagoblin/tests/test_exif.py .....
57mediagoblin/tests/test_globals.py .
58mediagoblin/tests/test_http_callback.py .
59mediagoblin/tests/test_messages.py .
60mediagoblin/tests/test_metadata.py .
61mediagoblin/tests/test_misc.py ...
62mediagoblin/tests/test_modelmethods.py ............F
63mediagoblin/tests/test_moderation.py ....
64mediagoblin/tests/test_notifications.py ...
65mediagoblin/tests/test_oauth1.py ....
66mediagoblin/tests/test_oauth2.py .......
67mediagoblin/tests/test_pdf.py s
68mediagoblin/tests/test_persona.py .
69mediagoblin/tests/test_piwigo.py .
70mediagoblin/tests/test_pluginapi.py ...........
71mediagoblin/tests/test_privileges.py ..
72mediagoblin/tests/test_processing.py ..
73mediagoblin/tests/test_reporting.py ...
74mediagoblin/tests/test_session.py .
75mediagoblin/tests/test_sql_migrations.py .
76mediagoblin/tests/test_staticdirect.py .
77mediagoblin/tests/test_storage.py .............
78mediagoblin/tests/test_submission.py ...s.............
79mediagoblin/tests/test_tags.py .
80mediagoblin/tests/test_timesince.py .
81mediagoblin/tests/test_util.py .......
82mediagoblin/tests/test_workbench.py .....
83
84=================================== FAILURES ===================================
85______________ TestUserUrlForSelf.test_url_for_self_not_callable _______________
86Traceback (most recent call last):
87 File "/home/debian/mediagoblin/2.6/mediagoblin/mediagoblin/tests/test_modelmethods.py", line 229, in test_url_for_self_not_callable
88 assert excinfo.errisinstance(TypeError)
89AssertionError: assert <bound method ExceptionInfo.errisinstance of <ExceptionInfo TypeError tblen=2>>(TypeError)
90 + where <bound method ExceptionInfo.errisinstance of <ExceptionInfo TypeError tblen=2>> = <ExceptionInfo TypeError tblen=2>.errisinstance
91------------------------------- Captured stdout --------------------------------
92-> Initializing main mediagoblin tables... done.
93 + Laying foundations for Privilege table
94-> Initializing plugin "mediagoblin.plugins.oauth"... done.
95-> Initializing plugin "mediagoblin.plugins.openid"... done.
96-> Initializing plugin "mediagoblin.media_types.image"... done.
97-> Initializing plugin "mediagoblin.media_types.pdf"... done.
98-> Initializing main mediagoblin tables... done.
99 + Laying foundations for Privilege table
100-> Initializing plugin "mediagoblin.plugins.oauth"... done.
101-> Initializing plugin "mediagoblin.plugins.openid"... done.
102-> Initializing plugin "mediagoblin.media_types.image"... done.
103-> Initializing plugin "mediagoblin.media_types.pdf"... done.
104============== 1 failed, 127 passed, 4 skipped in 567.68 seconds ===============
105
106
107
108Problematic code is an assertion in 'test_modelmethods.py' on line 229 :
109
110 227 with pytest.raises(TypeError) as excinfo:
111 228 self.user(u'lindsay').url_for_self(fake_urlgen())
112 229 assert excinfo.errisinstance(TypeError)
113
114
115
116Experimenting with pytest, ExceptionInfo, and errisinstance
117===========================================================
118
119There is a difference in the behavior of errisinstance()
120between python 2.6 and 2.7
121
122
123
124 Python 2.6.6 | Python 2.7.3
125-----------------------------------------------|------------------------------
126 >>> import pytest | >>> import pytest
127 >>> pytest.__version__ | >>> pytest.__version__
128 '2.5.2' | '2.5.2'
129 >>> with pytest.raises(TypeError) as excinfo: | >>> with pytest.raises(TypeError) as excinfo:
130 ... x = len(3) | ... x = len(3)
131 ... | ...
132 >>> excinfo | >>> excinfo
133 <ExceptionInfo TypeError tblen=1> | <ExceptionInfo TypeError tblen=1>
134 >>> excinfo.errisinstance(TypeError) | >>> excinfo.errisinstance(TypeError)
135 False | True
136
137