Community Packages

Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#25993 - [ipython] IPython.utils.traitlets.TraitError

Attached to Project: Community Packages
Opened by Alper Kanat (T-u-N-i-X) - Tuesday, 13 September 2011, 21:22 GMT
Last edited by Kyle Keen (keenerd) - Monday, 12 November 2012, 22:54 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Kyle Keen (keenerd)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Just trying to run ipython after a full pacman update. Tried deleting .ipython directory in my home dir with no luck.

$ ipython
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3.2/site-packages/IPython/core/history.py", line 154, in new_session
self.session_number = cur.lastrowid
File "/usr/lib/python3.2/site-packages/IPython/utils/traitlets.py", line 296, in __set__
new_value = self._validate(obj, value)
File "/usr/lib/python3.2/site-packages/IPython/utils/traitlets.py", line 304, in _validate
return self.validate(obj, value)
File "/usr/lib/python3.2/site-packages/IPython/utils/traitlets.py", line 862, in validate
self.error(obj, value)
File "/usr/lib/python3.2/site-packages/IPython/utils/traitlets.py", line 327, in error
raise TraitError(e)
IPython.utils.traitlets.TraitError: The 'session_number' trait of a HistoryManager instance must be an integer, but a value of None <class 'NoneType'> was specified.

Original exception was:
Traceback (most recent call last):
File "/usr/bin/ipython", line 7, in <module>
launch_new_instance()
File "/usr/lib/python3.2/site-packages/IPython/frontend/terminal/ipapp.py", line 369, in launch_new_instance
app.initialize()
File "/usr/lib/python3.2/site-packages/IPython/frontend/terminal/ipapp.py", line 283, in initialize
self.init_shell()
File "/usr/lib/python3.2/site-packages/IPython/frontend/terminal/ipapp.py", line 303, in init_shell
ipython_dir=self.ipython_dir)
File "/usr/lib/python3.2/site-packages/IPython/config/configurable.py", line 295, in instance
inst = cls(*args, **kwargs)
File "/usr/lib/python3.2/site-packages/IPython/frontend/terminal/interactiveshell.py", line 112, in __init__
user_global_ns=user_global_ns, custom_exceptions=custom_exceptions
File "/usr/lib/python3.2/site-packages/IPython/core/interactiveshell.py", line 386, in __init__
self.init_history()
File "/usr/lib/python3.2/site-packages/IPython/core/interactiveshell.py", line 1389, in init_history
self.history_manager = HistoryManager(shell=self, config=self.config)
File "/usr/lib/python3.2/site-packages/IPython/core/history.py", line 127, in __init__
self.new_session()
File "/usr/lib/python3.2/site-packages/IPython/core/history.py", line 154, in new_session
self.session_number = cur.lastrowid
File "/usr/lib/python3.2/site-packages/IPython/utils/traitlets.py", line 296, in __set__
new_value = self._validate(obj, value)
File "/usr/lib/python3.2/site-packages/IPython/utils/traitlets.py", line 304, in _validate
return self.validate(obj, value)
File "/usr/lib/python3.2/site-packages/IPython/utils/traitlets.py", line 862, in validate
self.error(obj, value)
File "/usr/lib/python3.2/site-packages/IPython/utils/traitlets.py", line 327, in error
raise TraitError(e)
IPython.utils.traitlets.TraitError: The 'session_number' trait of a HistoryManager instance must be an integer, but a value of None <class 'NoneType'> was specified.

$ y -Qs ipython
community-testing/ipython 0.11-2
An enhanced Interactive Python shell.
This task depends upon

Closed by  Kyle Keen (keenerd)
Monday, 12 November 2012, 22:54 GMT
Reason for closing:  Fixed
Comment by Kyle Keen (keenerd) - Wednesday, 14 September 2011, 13:16 GMT
Does 0.11-3 fix this?
Comment by Alper Kanat (T-u-N-i-X) - Sunday, 18 September 2011, 23:11 GMT
No. And it seems that it's related with the chronical tr_TR.UTF-8 locale problem. I reverted my locales to C and it worked just fine.
Comment by Alper Kanat (T-u-N-i-X) - Saturday, 01 October 2011, 12:18 GMT
  • Field changed: Percent Complete (100% → 0%)
No, it's in fact a bug. This should also be reported to upstream.
Comment by Kyle Keen (keenerd) - Monday, 03 October 2011, 16:00 GMT Comment by Thomas Kluyver (takluyver) - Tuesday, 04 October 2011, 12:24 GMT
In fact, the real bug is even further upstream, in Python's sqlite3 module. A fix has just been committed for that. http://bugs.python.org/issue13099

I've also added a workaround in IPython, simply by lowercasing the relevant SQL INSERT keyword. https://github.com/ipython/ipython/commit/a7f24ab921a39ec12cc3f15fc64c41508968d4af
Comment by Alper Kanat (T-u-N-i-X) - Tuesday, 04 October 2011, 12:26 GMT
cool! thanks!
Comment by Jelle van der Waa (jelly) - Monday, 12 November 2012, 21:22 GMT
Is the bug already fixed in the archlinux package?
Comment by Thomas Kluyver (takluyver) - Monday, 12 November 2012, 22:49 GMT
The package versions now in Arch should have the real fix (in python) and the workaround (in ipython), so I think this can be closed now. To verify, set locale to turkish (tr_TR.UTF-8) and try to start ipython.
Comment by Kyle Keen (keenerd) - Monday, 12 November 2012, 22:54 GMT
Alrighty. Turkish works for me, closing.

Loading...