Giter Club home page Giter Club logo

gouyong's People

Contributors

jiffies avatar polyrabbit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gouyong's Issues

debian7.7执行GouYong报错:TypeError: new() takes exactly 1 argument (0 given)

liangsh@lsh-dev:~/Downloads/marisa-0.2.4$ GouYong
[INFO 2015-01-19 19:14:23,541 youdaoQuery]:cache folder exists.
Traceback (most recent call last):
File "/usr/local/bin/GouYong", line 9, in
load_entry_point('GouYong==0.3', 'gui_scripts', 'GouYong')()
File "/usr/local/lib/python2.7/dist-packages/GouYong-0.3-py2.7.egg/GouYong/src/window.py", line 256, in main
pop=Popup()
File "/usr/local/lib/python2.7/dist-packages/GouYong-0.3-py2.7.egg/GouYong/src/window.py", line 32, in init
self.init_textview()
File "/usr/local/lib/python2.7/dist-packages/GouYong-0.3-py2.7.egg/GouYong/src/window.py", line 36, in init_textview
self.textbuffer = Gtk.TextBuffer.new()
File "/usr/lib/python2.7/dist-packages/gi/types.py", line 72, in constructor
return info.invoke(cls, _args, *_kwargs)
TypeError: new() takes exactly 1 argument (0 given)

Kali Rolling

获取某个单词,偏慢出现窗口,差不多3-5秒,而且不是空白的,就是一闪而过。
操作系统:

➜ /home/greenhand2learn >uname -a                                           [2016-09-29 10:24:23]
Linux Anonymous 4.6.0-kali1-amd64 #1 SMP Debian 4.6.4-1kali1 (2016-07-21) x86_64 GNU/Linux
➜ /home/greenhand2learn >lsb_release -a                                     [2016-09-29 10:24:25]
No LSB modules are available.
Distributor ID: Kali
Description:    Kali GNU/Linux Rolling
Release:    kali-rolling
Codename:   kali-rolling

运行报错信息

/usr/local/lib/python2.7/dist-packages/GouYong-0.3-py2.7.egg/GouYong/src/window.py:2: PyGIWarning: Gdk was imported without specifying a version first. Use gi.require_version('Gdk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gdk,Gtk,GLib,WebKit,GObject
/usr/local/lib/python2.7/dist-packages/GouYong-0.3-py2.7.egg/GouYong/src/window.py:2: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gdk,Gtk,GLib,WebKit,GObject
/usr/local/lib/python2.7/dist-packages/GouYong-0.3-py2.7.egg/GouYong/src/window.py:2: PyGIWarning: WebKit was imported without specifying a version first. Use gi.require_version('WebKit', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gdk,Gtk,GLib,WebKit,GObject
[INFO 2016-09-29 10:18:27,940 youdaoQuery]:cache folder exists.
/usr/local/lib/python2.7/dist-packages/GouYong-0.3-py2.7.egg/GouYong/src/indicator.py:3: PyGIWarning: AppIndicator3 was imported without specifying a version first. Use gi.require_version('AppIndicator3', '0.1') before import to ensure that the right version gets loaded.
  from gi.repository import AppIndicator3 as appindicator
[INFO 2016-09-29 10:18:29,273 window]:textbuffer init <Gtk.TextBuffer object at 0x7f9a60ecf8c0 (GtkTextBuffer at 0x2d8d980)>.
[INFO 2016-09-29 10:18:29,275 dict_manager]:['stardict-21shijishuangxiangcidian-2.4.2', 'lazy-dict']
openjdk version "1.8.0_102"
OpenJDK Runtime Environment (build 1.8.0_102-8u102-b14.1-2-b14)
OpenJDK 64-Bit Server VM (build 25.102-b14, mixed mode)
============Not Found fmt and trie,analysis now.
[INFO 2016-09-29 10:18:32,031 dict_manager]:载入/usr/share/GouYong/dict/lazy-dict/懒虫简明英汉词典
[DEBUG 2016-09-29 10:18:32,095 record]:work run

(GouYong:22255): Gdk-CRITICAL **: gdk_window_thaw_toplevel_updates: assertion 'window->update_and_descendants_freeze_count > 0' failed
[DEBUG 2016-09-29 10:18:33,489 window]:Not working.
[DEBUG 2016-09-29 10:18:33,489 window]:need at 26110661
[DEBUG 2016-09-29 10:18:33,489 utils]:elapsed time: 0.004053 ms
[DEBUG 2016-09-29 10:18:34,808 window]:Not working.
[DEBUG 2016-09-29 10:18:34,808 window]:need at 26111981
[DEBUG 2016-09-29 10:18:34,809 utils]:elapsed time: 0.005007 ms
[DEBUG 2016-09-29 10:18:36,976 window]:Not working.
[DEBUG 2016-09-29 10:18:36,977 window]:need at 26114149
[DEBUG 2016-09-29 10:18:36,977 utils]:elapsed time: 0.005007 ms
[DEBUG 2016-09-29 10:18:38,400 window]:Not working.
[DEBUG 2016-09-29 10:18:38,400 window]:need at 26115573
[DEBUG 2016-09-29 10:18:38,401 utils]:elapsed time: 0.003815 ms
[DEBUG 2016-09-29 10:18:38,577 window]:Not working.
[DEBUG 2016-09-29 10:18:38,577 window]:need at 26115749

无法ctrl+c停止运行,一直显示这个

[DEBUG 2016-09-29 10:24:53,984 window]:Signal callback already woking.
[DEBUG 2016-09-29 10:24:54,153 window]:Signal callback already woking.
[DEBUG 2016-09-29 10:24:54,488 window]:Signal callback already woking.

fedora 无法读取idx词典

使用fedora 20进行测试,顺便打了个 rpm包(https://copr.fedoraproject.org/coprs/mosquito/myrepo/)
本机依赖:

  • pygobject3-base = 3.10 (python-gi) # 比您列出的低了点
  • gobject-introspection = 3.10
  • marisa-python = 0.2.4

修改了以下几点:

  1. 可执行文件 GouYong -> gouyong (修改setup.py)
  2. 打了个patch
    --- GouYong/src/window.py 2014-10-28 01:50:05.976805122 +0800
    +++ GouYong/src/window.py 2014-10-28 03:16:56.698224308 +0800
    @@ -12,7 +12,7 @@
    -WIDTH = 700
    +WIDTH = 703
    @@ -32,7 +32,7 @@
  •    self.textbuffer = Gtk.TextBuffer.new()
    
  •    self.textbuffer = Gtk.TextBuffer.new(table=None)
    
  • sed -i -e 's@marisa_trie@marisa@g' -e 's@RecordTrie@Trie@g' GouYong/lib/pystardict.py

执行出错:
$ gouyong
[INFO 2014-10-28 03:32:45,305 dict_manager]:['stardict-21shijishuangxiangcidian-2.4.2', 'lazy-dict']
java version "1.7.0_65"
OpenJDK Runtime Environment (fedora-2.5.2.5.fc20-x86_64 u65-b17)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)

Traceback (most recent call last):
File "/usr/bin/gouyong", line 9, in
load_entry_point('gouyong==0.2', 'gui_scripts', 'gouyong')()
File "/usr/lib/python2.7/site-packages/gouyong/src/window.py", line 248, in main
dm.open_dict()
File "/usr/lib/python2.7/site-packages/gouyong/src/dict_manager.py", line 38, in open_dict
self.dict = Dictionary(os.path.join(self.dict_dir,dict_name))
File "/usr/lib/python2.7/site-packages/gouyong/src/../lib/pystardict.py", line 439, in init
self.idx = _StarDictIdx(dict_prefix=filename_prefix, container=self)
File "/usr/lib/python2.7/site-packages/gouyong/src/../lib/pystardict.py", line 183, in init
self.trie = marisa.Trie(fmt,dict)
TypeError: init() takes exactly 1 argument (3 given)

尝试修复:
注释了/usr/lib/python2.7/site-packages/gouyong//lib/pystardict.py的148, 149, 183, 184, 189, 190 之后,可以成功运行,并使用网络取词功能,但本机词典不可用。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.