Comments (5)
Hi,
I've modified termtosvg so that is uses a basic configuration file instead of Xresources. This means no more dependency on Xlib and no more crash for you, hopefully!
I have not released this version to the production pypi server yet, but you can dowload it from the test server:
pip install --extra-index-url https://test.pypi.org/simple/ 'termtosvg>=0.3.0rc0'
The updated README is available here: https://github.com/nbedos/termtosvg/tree/release/0.3.0
from termtosvg.
Hi, thanks for reporting the issue!
Even if your OS is old, termtosvg should not crash this way. I've asked the folks over at Xlib about it (python-xlib/python-xlib#117). Could you please watch the issue and provide them with more info about your setup if needed?
In the meantime you can bypass the call that makes termtosvg crash by supplying the theme option: termtosvg --theme zenburn
from termtosvg.
Could you please watch the issue and provide them with more info about your setup if needed?
Will do. Thanks.
In the meantime you can bypass the call that makes termtosvg crash by supplying the theme option: termtosvg --theme zenburn
Sorry. I still get the exact same backtrace.
km²~/.local/:bin> ./termtosvg --theme zenburn
Recording started, enter "exit" command or Control-D to end
Traceback (most recent call last):
File "/home/kmodi/.local/lib/python3.7/site-packages/Xlib/display.py", line 224, in __getattr__
function = self.display_extension_methods[attr]
KeyError: 'ge_add_event_data'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./termtosvg", line 11, in <module>
sys.exit(main())
File "/home/kmodi/.local/lib/python3.7/site-packages/termtosvg/__main__.py", line 172, in main
columns, lines, system_theme = term.get_configuration(output_fileno)
File "/home/kmodi/.local/lib/python3.7/site-packages/termtosvg/term.py", line 340, in get_configuration
xresources_str = _get_xresources()
File "/home/kmodi/.local/lib/python3.7/site-packages/termtosvg/term.py", line 361, in _get_xresources
d = display.Display()
File "/home/kmodi/.local/lib/python3.7/site-packages/Xlib/display.py", line 127, in __init__
mod.init(self, info)
File "/home/kmodi/.local/lib/python3.7/site-packages/Xlib/ext/xinput.py", line 652, in init
disp.ge_add_event_data(info.major_opcode, device_event, DeviceEventData)
File "/home/kmodi/.local/lib/python3.7/site-packages/Xlib/display.py", line 227, in __getattr__
raise AttributeError(attr)
AttributeError: ge_add_event_data
from termtosvg.
Oops, I did not think this through, sorry!
I thought getting color information from the Xserver would be useful but it may not be such a great idea after all. We'll see what the Xlib devs say about the crash. I will probably make the calls to Xlib optional, or maybe remove them completely, depending on the solution chosen to implement the font option (#3).
from termtosvg.
@nbedos This works great now. Thanks! I'll close this issue there as the ball's in the court of python-xlib now.
from termtosvg.
Related Issues (20)
- With CSS animation one frame can bleed into the previous frame HOT 3
- Generate ligature glyphs. HOT 1
- Optimize SVG output HOT 2
- Suggestion: Width 100% HOT 2
- Color issues and configuration HOT 12
- Remove "exit" from svg animation HOT 8
- Color issues in bold text in version 1.0.0
- Add support for ttyrec recording format
- jerky frames when viewing with Safari HOT 4
- Allow invocation through runpy HOT 1
- homepage svg doesn't play on safari HOT 6
- Firefox: slider in window_frame_js template misplaced and moving to the wrong direction, when SVG is in an HTML file HOT 1
- JavaScript themes without JavaScript enabled
- Cutting frames from resulting SVG
- Template window_frame_js does not work in GitHub HOT 1
- Can I install TermToSVG on Windows?
- Blink does not blink
- Idle timeout expected as int, but is float HOT 3
- Capture and preserve xterm title sequences. HOT 1
- build standalone binary 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 termtosvg.