Comments (4)
Please before posting such reports use either new patch (hope it gets applied soon) or change if exists('*pyeval')
to if 0&&exists('*pyeval')
in powerline/ext/vim/powerline.vim
. There is exactly no way we can deduce what happens here without knowing either full environment (steps how to reproduce the problem starting from vim -u NONE
is likely to be enough; using real full environment information will require too much effort to reproduce the problem if it is not obvious from the vim -u NONE
steps) or the stack trace (printed with the patch or when using compatibility function: this is what I described in first sentence). I guess this information needs to be added to troubleshooting section.
In any case, even if there was stack trace, do post bug reports for any vim plugin that contain sentences like “When doing vim -u NONE --cmd 'python from powerline import …'
, vim displays errors
”. “Error during startup” expressed here is almost never helpful (especially without good stack traces which are not available for pure VimL plugins; and for pyeval()
): if this happened on developer’s machines they would have already known. If this did not happen, they begin to know nothing except that “it does not work on @trevor’s machine”.
The only thing I can currently suggest is doing mv ~/.config/powerline{.bak}
(if ~/.config/powerline
exists) and git reset --hard HEAD
in powerline repository. If this helps your issue is not our issue, but issue with your configuration.
from powerline.
Please check out the solution in #37 as well. A recent change of some file locations may be the cause of this error, and a clean checkout could hopefully resolve your issue. I'll close this, please open a new issue with full error messages if you still experience any problems after trying the solution.
from powerline.
substituted for if 0&&exists('*pyeval')
Executing BufWinEnter Auto commands for "*"
autocommand call s:UpdateWindows()
Error detected while processing function <SNR>11_UpdateWindows..<SNR>11_pyeval:
line 1:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "<string>", line 1, in <module>
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/uuid.py", line 545, in uuid4
import random
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/random.py", line 47, in <module>
from os import urandom as _urandom
ImportError: cannot import name urandom
Executing BufWinEnter Auto commands for "*"
autocommand call s:UpdateWindows()
function uuid4 in uuid.py:
def uuid4():
"""Generate a random UUID."""
# When the system provides a version-4 UUID generator, use it.
if _uuid_generate_random:
_buffer = ctypes.create_string_buffer(16)
_uuid_generate_random(_buffer)
return UUID(bytes=_buffer.raw)
# Otherwise, get randomness from urandom or the 'random' module.
try:
import os
return UUID(bytes=os.urandom(16), version=4)
except:
import random
bytes = [chr(random.randrange(256)) for i in range(16)]
return UUID(bytes=bytes, version=4)
it appears to catching an exception when os.urandom(16)
is run when originally called by s:pyeval('str(uuid.uuid4())')
. issue isn't present in python repl.
from powerline.
this solved it python-mode/python-mode#87 (comment)
thanks
from powerline.
Related Issues (20)
- No such file or directory (sometimes) HOT 1
- metadata-generation-failed when installing on on python 3.11/macOS 12 HOT 1
- setup fails for development version of tmux HOT 1
- Centre segments section HOT 1
- Logging test fail on python 3.8+
- Is it possible to set a highlight group for the environment variable segment? HOT 1
- Powerline doesn't working on Ubuntu 22.04.3 and bash
- Color and colorshemes override not working - gnome terminal - shell HOT 3
- powerline.segments.common.net.internal_ip HOT 2
- TMUX_VAR_RE does not use raw string, leading to SyntaxWarning with python 3.12
- powerline deprecation warning
- [feature] json schema support HOT 1
- The imp module is removed in Python 3.12 HOT 4
- Questions about Copilot + Open Source Software Hierarchy
- Questions about Copilot + Open Source Software Hierarchy
- does powerline works for csh HOT 4
- Terminal graphics don’t work correctly in Fedora 40 KDE HOT 2
- fuzzy_time segment prints "o'clock three" instead of "three o'clock" HOT 2
- Weather segment broken (Bad Yahoo Weather SSL Cert) in RHEL 9
- Apt package missing bash bindings HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powerline.