ipython 0.10.2与turbogears贴纸外壳碰撞
turbogears具有与Ipython集成的贴纸外壳。 为此,您必须使用版本0.10.2(或更低版本) 所以在虚拟电视中我做到了:ipython 0.10.2与turbogears贴纸外壳碰撞,ipython,paster,turbogears2,Ipython,Paster,Turbogears2,turbogears具有与Ipython集成的贴纸外壳。 为此,您必须使用版本0.10.2(或更低版本) 所以在虚拟电视中我做到了: pip install ipython=0.10.2 当我运行paster shell时,我得到: 哦,伊皮顿坠毁了。我们尽力使它稳定,但是 A crash report was automatically generated with the following information: - A verbatim copy of the crash tr
pip install ipython=0.10.2
当我运行paster shell时,我得到:
哦,伊皮顿坠毁了。我们尽力使它稳定,但是
A crash report was automatically generated with the following information:
- A verbatim copy of the crash traceback.
- A copy of your input history during this session.
- Data on your current IPython configuration.
这是Ipython崩溃报告
IPython验尸报告
IPython版本:0.10.2
平台信息:os.name->nt,sys.Platform->win32
***************************************************************************
当前用户配置结构:
{'Version':0,
“允许”:对,
“别名”:[],
“args”:[],
“自动调用”:1,
“自动编辑语法”:0,
“autoexec”:[],
“自动缩进”:1,
“automagic”:1,
"横幅":一,,
“c:”,
“缓存大小”:1000,
“经典”:0,
“颜色信息”:1,
“颜色”:“Linux”,
“确认退出”:1,
“调试”:0,
“深\u重新加载”:0,
“编辑器”:“0”,
“execfile”:[],
“执行”:[“”],
“gthread”:0,
“帮助”:0,
“全部导入”:[],
“导入模块”:[],
“导入一些”:[[]],
“包括”:[],
“交互”:0,
“ipythondir”:u'c:\\users\\alonisser\\\\u ipython',
“日志”:0,
“日志文件”:“,
“日志播放”:“,
“magic_docstrings”:0,
“消息”:1,
“多线特价”:1,
“nosp”:0,
“对象信息字符串级别”:0,
'opts':结构({''uu allownew':True}),
“pdb”:0,
“pprint”:1,
“个人资料”:“,
“prompt_in1”:“In[\\\\\\]:”,
'提示2':'。\\D.:',
“提示输出”:“输出[\\\\\]:”,
'prompts_pad_left':1,
“pydb”:0,
“pylab”:0,
“pylab_import_all”:1,
“q4thread”:0,
“qthread”:0,
“快速”:0,
“安静”:0,
“rcfile”:“ipythonrc.ini”,
“readline”:1,
“读取行\u合并\u完成”:1,
“readline\u省略\u名称”:0,
“readline_parse_and_bind”:[“tab:complete”,
“\\C-l”:可能的完成情况”,
'设置在不明确时显示全部',
“\\C-o”:插入制表符”,
“\\M-i”:”,
“\\M-o”:“\\d\\d\\d”,
“\\M-I”:“\\d\\d\\d”,
“\\C-r”:反向搜索历史记录”,
“\\C-s”:正向搜索历史记录”,
“\\C-p”:向后搜索历史记录”,
“\\C-n”:向前搜索历史记录”,
“\\e[A:向后搜索历史记录”,
“\\e[B:向前搜索历史记录”,
“\\C-k”:压井管线”,
“\\C-u”:unix行放弃'],
“readline\u remove\u delims':'-/~',
“屏幕长度”:0,
'分开在':'\\n',
“分开”:“0”,
“分离输出2”:“0”,
“系统_头”:“IPython系统调用:”,
“系统详细”:1,
“术语名称”:1,
“tk”:0,
“升级”:0,
“通配符区分大小写”:1,
“wthread”:0,
“wxversion”:“0”,
'xmode':'Context'}
***************************************************************************
崩溃回溯:
---------------------------------------------------------------------------
TypeError Python 2.7.4:c:\dev\envs\agents\Scripts\Python.exe
2013年6月11日星期二15:39:42
执行Python代码时出现问题。以下是函数序列
导致错误的调用,最近(最内层)的调用最后一次。
c:\dev\envs\agents\Scripts\ipython-script.py in()
1.
2.
3.
4.
5.
6.
7.
----> 8
全局加载入口点=
9#!c:\dev\envs\agents\Scripts\python.exe
10#EASY-INSTALL-ENTRY-SCRIPT:'ipython==0.10.2','console_scripts','ipython'
11 uuu需要uuu='ipython==0.10.2'
12进口系统
13从pkg_资源导入加载入口点
14
15系统出口(
16加载入口点('ipython==0.10.2','console脚本','ipython')()
17 )
18
19
20
21
22
23
24
25
26
27
28
29
30
31
c:\dev\envs\agents\lib\site packages\IPython\ipapi.pyc在launch_new_实例中(user_ns=None,shellclass=None)
541
542 def check_hotname(自我,姓名):
543如果self.hotnames中的名称:
544 self.debug_堆栈(“热名称“%s”捕获“%name”)
545
546
547 def启动新实例(用户\u ns=None,shellclass=None):
548“创建并启动新的ipython实例。
549
550即使没有已初始化的
551 ipython会话正在运行。
552
553这也被用作“ipython”脚本的egg入口点。
554
555 """
-->556 ses=生成会话(用户,外壳类)
557 ses.mainloop()
558
559
560 def生成用户(用户=无):
561“”返回有效的用户交互命名空间。
562
563这构建了一个dict,其中包含作为一个整体运行所需的最少信息
564有效的IPython用户名称空间,您可以将其传递给各个嵌入
伊皮顿565班。
566
567此API当前已弃用。请改用ipapi.make_user_namespace()
568以同时生成本地和全局命名空间对象。
569
570:参数:
571用户:类似dict,可选
make_会话中的c:\dev\envs\agents\lib\site packages\IPython\ipapi.pyc(user_ns=None,shellclass=None)
669
670 def make_会话(用户编号=无,外壳类别=无):
671“”生成,但不启动IPython会话。
672
673稍后,您可以对返回的对象调用obj.mainloop()。
674
675输入:
676
677-user_ns(None):用作用户名称空间的dict,带有首字母
678数据。
679
680警告:当会话已存在时,不应*运行此操作。”“”
681
682进口IPython.Shell
683如果shellclass为无:
-->684返回IPython.Shell.start(用户)
685返回
IPython post-mortem report
IPython version: 0.10.2
Platform info : os.name -> nt, sys.platform -> win32
***************************************************************************
Current user configuration structure:
{'Version': 0,
'__allownew': True,
'alias': [],
'args': [],
'autocall': 1,
'autoedit_syntax': 0,
'autoexec': [],
'autoindent': 1,
'automagic': 1,
'banner': 1,
'c': '',
'cache_size': 1000,
'classic': 0,
'color_info': 1,
'colors': 'Linux',
'confirm_exit': 1,
'debug': 0,
'deep_reload': 0,
'editor': '0',
'execfile': [],
'execute': [''],
'gthread': 0,
'help': 0,
'import_all': [],
'import_mod': [],
'import_some': [[]],
'include': [],
'interact': 0,
'ipythondir': u'c:\\users\\alonisser\\_ipython',
'log': 0,
'logfile': '',
'logplay': '',
'magic_docstrings': 0,
'messages': 1,
'multi_line_specials': 1,
'nosep': 0,
'object_info_string_level': 0,
'opts': Struct({'__allownew': True}),
'pdb': 0,
'pprint': 1,
'profile': '',
'prompt_in1': 'In [\\#]: ',
'prompt_in2': ' .\\D.: ',
'prompt_out': 'Out[\\#]: ',
'prompts_pad_left': 1,
'pydb': 0,
'pylab': 0,
'pylab_import_all': 1,
'q4thread': 0,
'qthread': 0,
'quick': 0,
'quiet': 0,
'rcfile': 'ipythonrc.ini',
'readline': 1,
'readline_merge_completions': 1,
'readline_omit__names': 0,
'readline_parse_and_bind': ['tab: complete',
'"\\C-l": possible-completions',
'set show-all-if-ambiguous on',
'"\\C-o": tab-insert',
'"\\M-i": " "',
'"\\M-o": "\\d\\d\\d\\d"',
'"\\M-I": "\\d\\d\\d\\d"',
'"\\C-r": reverse-search-history',
'"\\C-s": forward-search-history',
'"\\C-p": history-search-backward',
'"\\C-n": history-search-forward',
'"\\e[A": history-search-backward',
'"\\e[B": history-search-forward',
'"\\C-k": kill-line',
'"\\C-u": unix-line-discard'],
'readline_remove_delims': '-/~',
'screen_length': 0,
'separate_in': '\\n',
'separate_out': '0',
'separate_out2': '0',
'system_header': 'IPython system call: ',
'system_verbose': 1,
'term_title': 1,
'tk': 0,
'upgrade': 0,
'wildcards_case_sensitive': 1,
'wthread': 0,
'wxversion': '0',
'xmode': 'Context'}
***************************************************************************
Crash traceback:
---------------------------------------------------------------------------
TypeError Python 2.7.4: c:\dev\envs\agents\Scripts\python.exe
Tue Jun 11 15:39:42 2013
A problem occured executing Python code. Here is the sequence of function
calls leading up to the error, with the most recent (innermost) call last.
c:\dev\envs\agents\Scripts\ipython-script.py in <module>()
1
2
3
4
5
6
7
----> 8
global load_entry_point = <function load_entry_point at 0x022EBBF0>
9 #!c:\dev\envs\agents\Scripts\python.exe
10 # EASY-INSTALL-ENTRY-SCRIPT: 'ipython==0.10.2','console_scripts','ipython'
11 __requires__ = 'ipython==0.10.2'
12 import sys
13 from pkg_resources import load_entry_point
14
15 sys.exit(
16 load_entry_point('ipython==0.10.2', 'console_scripts', 'ipython')()
17 )
18
19
20
21
22
23
24
25
26
27
28
29
30
31
c:\dev\envs\agents\lib\site-packages\IPython\ipapi.pyc in launch_new_instance(user_ns=None, shellclass=None)
541
542 def check_hotname(self,name):
543 if name in self.hotnames:
544 self.debug_stack( "HotName '%s' caught" % name)
545
546
547 def launch_new_instance(user_ns = None,shellclass = None):
548 """ Make and start a new ipython instance.
549
550 This can be called even without having an already initialized
551 ipython session running.
552
553 This is also used as the egg entry point for the 'ipython' script.
554
555 """
--> 556 ses = make_session(user_ns,shellclass)
557 ses.mainloop()
558
559
560 def make_user_ns(user_ns = None):
561 """Return a valid user interactive namespace.
562
563 This builds a dict with the minimal information needed to operate as a
564 valid IPython user namespace, which you can pass to the various embedding
565 classes in ipython.
566
567 This API is currently deprecated. Use ipapi.make_user_namespaces() instead
568 to make both the local and global namespace objects simultaneously.
569
570 :Parameters:
571 user_ns : dict-like, optional
c:\dev\envs\agents\lib\site-packages\IPython\ipapi.pyc in make_session(user_ns=None, shellclass=None)
669
670 def make_session(user_ns = None, shellclass = None):
671 """Makes, but does not launch an IPython session.
672
673 Later on you can call obj.mainloop() on the returned object.
674
675 Inputs:
676
677 - user_ns(None): a dict to be used as the user's namespace with initial
678 data.
679
680 WARNING: This should *not* be run when a session exists already."""
681
682 import IPython.Shell
683 if shellclass is None:
--> 684 return IPython.Shell.start(user_ns)
685 return shellclass(user_ns = user_ns)
686
687
688
689
690
691
692
693
694
695
696
697
698
699
c:\dev\envs\agents\lib\site-packages\IPython\Shell.pyc in start(user_ns=None)
1227 th_mode = special_opts.pop()
1228 except KeyError:
1229 th_mode = 'tkthread'
1230 return th_shell[th_mode]
1231
1232
1233 # This is the one which should be called by external code.
1234 def start(user_ns = None):
1235 """Return a running shell instance, dealing with threading options.
1236
1237 This is a factory function which will instantiate the proper IPython shell
1238 based on the user's threading choice. Such a selector is needed because
1239 different GUI toolkits require different thread handling details."""
1240
1241 shell = _select_shell(sys.argv)
-> 1242 return shell(user_ns = user_ns)
1243
1244 # Some aliases for backwards compatibility
1245 IPythonShell = IPShell
1246 IPythonShellEmbed = IPShellEmbed
1247 #************************ End of file <Shell.py> ***************************
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
c:\dev\envs\agents\lib\site-packages\IPython\Shell.pyc in __init__(self=<IPython.Shell.IPShell instance>, argv=None, user_ns=None, user_global_ns=None, debug=1, shell_class=<class 'IPython.iplib.InteractiveShell'>)
58 # Default timeout for waiting for multithreaded shells (in seconds)
59 GUI_TIMEOUT = 10
60
61 #-----------------------------------------------------------------------------
62 # This class is trivial now, but I want to have it in to publish a clean
63 # interface. Later when the internals are reorganized, code that uses this
64 # shouldn't have to change.
65
66 class IPShell:
67 """Create an IPython instance."""
68
69 def __init__(self,argv=None,user_ns=None,user_global_ns=None,
70 debug=1,shell_class=InteractiveShell):
71 self.IP = make_IPython(argv,user_ns=user_ns,
72 user_global_ns=user_global_ns,
---> 73 debug=debug,shell_class=shell_class)
global For = undefined
global more = undefined
global details = undefined
global see = undefined
global the = undefined
global __call__ = undefined
global method = undefined
global below. = undefined
74
75 def mainloop(self,sys_exit=0,banner=None):
76 self.IP.mainloop(banner)
77 if sys_exit:
78 sys.exit()
79
80 #-----------------------------------------------------------------------------
81 def kill_embedded(self,parameter_s=''):
82 """%kill_embedded : deactivate for good the current embedded IPython.
83
84 This function (after asking for confirmation) sets an internal flag so that
85 an embedded IPython will never activate again. This is useful to
86 permanently disable a shell that is being called inside a loop: once you've
87 figured out what you needed from it, you may then kill it and the program
88 will then continue to run without the interactive shell interfering again.
c:\dev\envs\agents\lib\site-packages\IPython\ipmaker.pyc in make_IPython(argv=[r'c:\dev\envs\agents\Scripts\ipython-script.py'], user_ns=None, user_global_ns=None, debug=1, rc_override=None, shell_class=<class 'IPython.iplib.InteractiveShell'>, embedded=False, **kw={})
506 # tweaks. Basically options which affect other options. I guess this
507 # should just be written so that options are fully orthogonal and we
508 # wouldn't worry about this stuff!
509
510 if IP_rc.classic:
511 IP_rc.quick = 1
512 IP_rc.cache_size = 0
513 IP_rc.pprint = 0
514 IP_rc.prompt_in1 = '>>> '
515 IP_rc.prompt_in2 = '... '
516 IP_rc.prompt_out = ''
517 IP_rc.separate_in = IP_rc.separate_out = IP_rc.separate_out2 = '0'
518 IP_rc.colors = 'NoColor'
519 IP_rc.xmode = 'Plain'
520
--> 521 IP.pre_config_initialization()
522 # configure readline
523
524 # update exception handlers with rc file status
525 otrap.trap_out() # I don't want these messages ever.
526 IP.magic_xmode(IP_rc.xmode)
527 otrap.release_out()
528
529 # activate logging if requested and not reloading a log
530 if IP_rc.logplay:
531 IP.magic_logstart(IP_rc.logplay + ' append')
532 elif IP_rc.logfile:
533 IP.magic_logstart(IP_rc.logfile)
534 elif IP_rc.log:
535 IP.magic_logstart()
536
c:\dev\envs\agents\lib\site-packages\IPython\iplib.pyc in pre_config_initialization(self=<IPython.iplib.InteractiveShell object>)
820 self.user_ns, # globals
821 # Skip our own frame in searching for locals:
822 sys._getframe(depth+1).f_locals # locals
823 ))
824
825 def pre_config_initialization(self):
826 """Pre-configuration init method
827
828 This is called before the configuration files are processed to
829 prepare the services the config files might need.
830
831 self.rc already has reasonable default values at this point.
832 """
833 rc = self.rc
834 try:
--> 835 self.db = pickleshare.PickleShareDB(rc.ipythondir + "/db")
global Optional = undefined
global inputs = undefined
836 except exceptions.UnicodeDecodeError:
837 print "Your ipythondir can't be decoded to unicode!"
838 print "Please set HOME environment variable to something that"
839 print r"only has ASCII characters, e.g. c:\home"
840 print "Now it is",rc.ipythondir
841 sys.exit()
842 self.shadowhist = IPython.history.ShadowHist(self.db)
843
844 def post_config_initialization(self):
845 """Post configuration init method
846
847 This is called after the configuration files have been processed to
848 'finalize' the initialization."""
849
850 rc = self.rc
c:\dev\envs\agents\lib\site-packages\IPython\Extensions\pickleshare.pyc in __init__(self=PickleShareDB('c:\users\alonisser\_ipython\db'), root=u'c:\\users\\alonisser\\_ipython/db')
38 import cPickle as pickle
39 import UserDict
40 import warnings
41 import glob
42
43 def gethashfile(key):
44 return ("%02x" % abs(hash(key) % 256))[-2:]
45
46 _sentinel = object()
47
48 class PickleShareDB(UserDict.DictMixin):
49 """ The main 'connection' object for PickleShare database """
50 def __init__(self,root):
51 """ Return a db object that will manage the specied directory"""
52 self.root = Path(root).expanduser().abspath()
---> 53 if not self.root.isdir():
54 self.root.makedirs()
55 # cache has { 'key' : (obj, orig_mod_time) }
56 self.cache = {}
57
58
59 def __getitem__(self,key):
60 """ db['key'] reading """
61 fil = self.root / key
62 try:
63 mtime = (fil.stat()[stat.ST_MTIME])
64 except OSError:
65 raise KeyError(key)
66
67 if fil in self.cache and mtime == self.cache[fil][1]:
68 return self.cache[fil][0]
TypeError: _isdir() takes exactly 1 argument (0 given)
***************************************************************************
History of session input:
*** Last line of input (may not be in above history):