-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: super() argument 1 must be type, not classobj (Python 2.6.6) #3968
Comments
I believe classobj means an old style class. Super() only works with new
|
so we can't use super. closes ipython#3968
so we can't use super. closes ipython#3968
I had the same error on python 2.7
|
I don't see how it's possible for you to have seen this on 2.7: $ python2.6 -c "import sys,logging; print sys.version.split()[0], type(logging.Formatter)"
2.6.7 <type 'classobj'>
$ python2.7 -c "import sys,logging; print sys.version.split()[0], type(logging.Formatter)"
2.7.2 <type 'type'> What do you get from running that? |
Here is what I got:
|
That's just weird. logging.Formatter is a new-style class as of 2.7.0, so somehow you seem to have at least part of the 2.6 stdlib in your 2.7 venv. Can you test outside the venv? |
And do you have PYTHONPATH set? Normally |
It turns out that I can solve this problem by editing the logging/init.py file. I changed from
to
and no longer have the error. |
But why do you have |
I am working on a code repository that pushes updates to tens of hundreds |
so we can't use super. closes ipython#3968
When starting the ipython notebook I get the following error
strangely enough the notebook works and can be used, however nbconvert does not produce any output and cannot be used. The IPython terminal does not invoke this error.
Looks like it is related to LevelFormatter.
System info:
{'codename': 'An Afternoon Hack',
'commit_hash': '02da31c',
'commit_source': 'installation',
'default_encoding': 'UTF-8',
'ipython_path': '/usr2/gager/usr/lib/python2.6/site-packages/ipython-1.0.0-py2.6.egg/IPython',
'ipython_version': '1.0.0',
'os_name': 'posix',
'platform': 'Linux-2.6.32-358.2.1.el6.x86_64-x86_64-with-redhat-6.4-Carbon',
'sys_executable': '/usr/bin/python',
'sys_platform': 'linux2',
'sys_version': '2.6.6 (r266:84292, Feb 21 2013, 19:26:11) \n[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)]'}
Update:
I forgot to mention that using a VM (Ubuntu 12.04) and Python 2.7.3 this error does not appear!
The text was updated successfully, but these errors were encountered: