xrange not defined running under Python 3.3
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
UltiSnips |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I'm seeing a stack trace like this one trying to open a JS file with Vim 7.4, linked against Python 3.3:
Error detected while processing function UltiSnips_
line 2:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/
self.
File "/home/
self.
File "/home/
self.
File "/home/
for fn in self.base_
File "/home/
if _should_
File "/home/
return not _snippets_
File "/home/
plugin_
File "/home/
for i in xrange(10):
NameError: global name 'xrange' is not defined
Output of :py3 import sys; print(sys.version):
3.3.3 (default, Jan 24 2014, 14:40:19)
[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)]
On actually trying to complete a snippet, like say this one:
snippet log "console.log"
console.log(${1});
endsnippet
I get a much harder to read stack trace like this on typing "log" and hitting <tab>:
Error detected while processing function UltiSnips_
line 1:
Traceback (most recent call last):
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
File "/home/
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
return f(self, *args, **kwds)
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
File "/home/
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
if not self._try_expand():
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
File "/home/
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
snippets = self._snips(before, False)
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
File "/home/
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
self.
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
File "/home/
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
self.
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
File "/home/
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
if self._needs_
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
File "/home/
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
cur_snips = set(self.
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
File "/home/
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
if _should_
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
File "/home/
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
return not _snippets_
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
File "/home/
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
plugin_
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
File "/home/
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
for i in xrange(10):
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
NameError: global name 'xrange' is not defined
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
During handling of the above exception, another exception occurred:
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
Traceback (most recent call last):
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
File "<string>", line 1, in <module>
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
File "/home/
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
_vim.
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
File "/home/
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
command("set ft=text")
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
File "/home/
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
return as_unicode(
Press ENTER or type command to continue
Error detected while processing function UltiSnips_
line 1:
vim.error: Vim(py3):Traceback (most recent call last):
Changed in ultisnips: | |
status: | Invalid → New |
I should also add, I added this to my .vimrc:
let g:UltiSnipsUseP ythonVersion = 3
but the error remains.