Error in atexit._run_exitfuncs with setup.py, nose.collector and nose 1.1.2

3,822 views
Skip to first unread message

nma...@gmail.com

unread,
Oct 13, 2011, 12:10:38 PM10/13/11
to nose-users
I recently changed a package to use nose.collector as the testsuite in
setup.py. I find that if I run

python setup.py test

Using nose 1.1.2 I get the following error after the tests have
completed:

----------------------------------------------------------------------
Ran 15 tests in 7.156s

OK
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/usr/lib/python2.7/multiprocessing/util.py", line 284, in
_exit_function
info('process shutting down')
TypeError: 'NoneType' object is not callable
Error in sys.exitfunc:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/usr/lib/python2.7/multiprocessing/util.py", line 284, in
_exit_function
info('process shutting down')
TypeError: 'NoneType' object is not callable

If I use nose 1.0.0 I do not get the problem. This is running on a 64-
bit ubuntu 11.04 install, using the system python 2.7. Another data
point: using nose 1.1.2 on a much older system (Debian 5.0, python
2.5) I don't seem to have that problem irrespective of which python
version I use.

Any ideas what could be causing the problem nose nose 1.1.2 on the
newer system, and where one could start looking?

Thanks
Neilen

aaronyo

unread,
Nov 7, 2011, 6:03:29 PM11/7/11
to nose-users
Did you ever figure this out?

I'm seeing the exact same problem on Ubuntu 11.04, but I'm using
py2.6.

Thanks in advance for any help.

Brian Hicks

unread,
Jan 5, 2012, 10:13:30 AM1/5/12
to nose-...@googlegroups.com
I'm running into the same problem. Succinctly:

setup(
    test_suite = 'nose.collector',
    tests_require = [
        'nose==1.1.2',
        'mock==0.7.2',
    ]
)

has the error. Python 2.7.2+ on Ubuntu.

bow

unread,
Mar 5, 2012, 3:29:10 PM3/5/12
to nose-...@googlegroups.com
Hi everyone,

Just to report that I've just been bitten by the same bug.

setup.py:
    tests_require=[
        'nose>=1.1.2',
        'mock>=0.8.0',
    ],  

Here's the trace:
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/usr/lib/python2.7/multiprocessing/util.py", line 284, in _exit_function
    info('process shutting down')
TypeError: 'NoneType' object is not callable
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/usr/lib/python2.7/multiprocessing/util.py", line 284, in _exit_function
    info('process shutting down')

All my test pass just fine and this bug only appears when I run 'python setup.py test'.
Running nose directly from nosetests doesn't produce any errors. 

I'm running Python 2.7.2 on Arch Linux x86_64. 

Has anyone found a fix / patch for this? Or is nose really the cause here?

Thanks in advance,
Bow

jason pellerin

unread,
Mar 6, 2012, 9:23:03 AM3/6/12
to nose-...@googlegroups.com
I've seen similar issues with test suites that use other packages, but
I don't think nose is directly at fault -- nose doesn't define any
atexit handlers. It may be that the way it exits at the end of the
test run causes issues for some other packages, though.

JP

> --
> You received this message because you are subscribed to the Google Groups
> "nose-users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/nose-users/-/OK0rvntOtdYJ.
>
> To post to this group, send email to nose-...@googlegroups.com.
> To unsubscribe from this group, send email to
> nose-users+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/nose-users?hl=en.

Matt Wright

unread,
Mar 9, 2012, 11:52:51 AM3/9/12
to nose-...@googlegroups.com
I'm experiencing the same problem on OS X 10.7.3. My tests all pass just fine as well.

Alex Vykalyuk

unread,
Apr 23, 2012, 5:11:48 PM4/23/12
to nose-...@googlegroups.com
I have the same issue. 
It appears if I run on Python 2.6 and 2.7;
Python 2.5 run tests fine.
OS: Ubuntu 12.04

Anthony Ford

unread,
May 25, 2012, 11:16:55 PM5/25/12
to nose-...@googlegroups.com
Has anyone figured this out?

I have some code that has this exact same problem.

Using nose 1.1.2 I get the same error in Python 2.6 and 2.7, but no problem in 2.5.
I'd love to get this figured out and fixed...

Thanks,
Ford
Reply all
Reply to author
Forward
0 new messages