Code Monkey home page Code Monkey logo

Comments (4)

SOREMUZ avatar SOREMUZ commented on June 21, 2024 1

我也遇到了类似的问题,具体表现为 common.py 文件报错。经过尝试我发现了解决方法,具体操作如下:

解决方案

  1. 在 Anki 主界面点击「工具」→「插件」→「插件文件」,进入 FastWordQuery 插件目录(1807206748),使用文本编辑器打开 「common.py」文件。

  2. 跳转至 159-162 行,此处代码原本为:

                        menu.addAction(
                            _("ALL_FIELDS"),
                            lambda: query_from_editor_fields(self.editor),
                            QKeySequence(my_shortcut))

    将第二个参数和第三个参数位置对调即可,即修改为:

                        menu.addAction(
                            _("ALL_FIELDS"),
                            QKeySequence(my_shortcut),
                            lambda: query_from_editor_fields(self.editor))
  3. 跳转至 240-242 行,此处代码原本为:

            submenu.addAction(
                _('ALL_FIELDS'), lambda: query_from_editor_fields(web_view.editor),
                QKeySequence(my_shortcut))

    同样将第二个参数和第三个参数位置对调即可,即修改为:

            submenu.addAction(
                _('ALL_FIELDS'), QKeySequence(my_shortcut),
                lambda: query_from_editor_fields(web_view.editor))

运行环境

  • OS: Windows 11
  • Anki: 2.1.65 (aa9a734f)⁩
  • Python 3.9.15 Qt 6.4.3 PyQt 6.4.0

I also have a same problem that file "common.py" has some mistakes. Finally, I have found the solution.

Solution

  1. Click on "Tools" -> "Plugins" -> "Plugin Files" in Anki to enter the FastWordQuery directory (1807206748). Use a text editor to open the "common.py"

  2. Jump to lines 159-162. Modify

                        menu.addAction(
                            _("ALL_FIELDS"),
                            lambda: query_from_editor_fields(self.editor),
                            QKeySequence(my_shortcut))

    to

                        menu.addAction(
                            _("ALL_FIELDS"),
                            QKeySequence(my_shortcut),
                            lambda: query_from_editor_fields(self.editor))
  3. Jump to lines 240-242. Modify

            submenu.addAction(
                _('ALL_FIELDS'), lambda: query_from_editor_fields(web_view.editor),
                QKeySequence(my_shortcut))

    to

            submenu.addAction(
                _('ALL_FIELDS'), QKeySequence(my_shortcut),
                lambda: query_from_editor_fields(web_view.editor))

Environment

  • OS: Windows 11
  • Anki: 2.1.65 (aa9a734f)⁩
  • Python 3.9.15 Qt 6.4.3 PyQt 6.4.0

你好,已经有好心人修复这个插件了,请在这里安装https://ankiweb.net/shared/info/103636257

from fastwordquery.

Buliet avatar Buliet commented on June 21, 2024

临时解决:先添加完单词,再选中后通过标题栏,进行query
如果 只是反馈错误,请无视临时解决

from fastwordquery.

SOREMUZ avatar SOREMUZ commented on June 21, 2024

我也有同样的错误 请问你解决了吗?

from fastwordquery.

tgz033 avatar tgz033 commented on June 21, 2024

我也遇到了类似的问题,具体表现为 common.py 文件报错。经过尝试我发现了解决方法,具体操作如下:

解决方案

  1. 在 Anki 主界面点击「工具」→「插件」→「插件文件」,进入 FastWordQuery 插件目录(1807206748),使用文本编辑器打开 「common.py」文件。
  2. 跳转至 159-162 行,此处代码原本为:
                        menu.addAction(
                            _("ALL_FIELDS"),
                            lambda: query_from_editor_fields(self.editor),
                            QKeySequence(my_shortcut))
    将第二个参数和第三个参数位置对调即可,即修改为:
                        menu.addAction(
                            _("ALL_FIELDS"),
                            QKeySequence(my_shortcut),
                            lambda: query_from_editor_fields(self.editor))
  3. 跳转至 240-242 行,此处代码原本为:
            submenu.addAction(
                _('ALL_FIELDS'), lambda: query_from_editor_fields(web_view.editor),
                QKeySequence(my_shortcut))
    同样将第二个参数和第三个参数位置对调即可,即修改为:
            submenu.addAction(
                _('ALL_FIELDS'), QKeySequence(my_shortcut),
                lambda: query_from_editor_fields(web_view.editor))

运行环境

  • OS: Windows 11
  • Anki: 2.1.65 (aa9a734f)⁩
  • Python 3.9.15 Qt 6.4.3 PyQt 6.4.0

I also have a same problem that file "common.py" has some mistakes. Finally, I have found the solution.

Solution

  1. Click on "Tools" -> "Plugins" -> "Plugin Files" in Anki to enter the FastWordQuery directory (1807206748). Use a text editor to open the "common.py"
  2. Jump to lines 159-162. Modify
                        menu.addAction(
                            _("ALL_FIELDS"),
                            lambda: query_from_editor_fields(self.editor),
                            QKeySequence(my_shortcut))
    to
                        menu.addAction(
                            _("ALL_FIELDS"),
                            QKeySequence(my_shortcut),
                            lambda: query_from_editor_fields(self.editor))
  3. Jump to lines 240-242. Modify
            submenu.addAction(
                _('ALL_FIELDS'), lambda: query_from_editor_fields(web_view.editor),
                QKeySequence(my_shortcut))
    to
            submenu.addAction(
                _('ALL_FIELDS'), QKeySequence(my_shortcut),
                lambda: query_from_editor_fields(web_view.editor))

Environment

  • OS: Windows 11
  • Anki: 2.1.65 (aa9a734f)⁩
  • Python 3.9.15 Qt 6.4.3 PyQt 6.4.0

from fastwordquery.

Related Issues (20)

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.