Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spell-check not working in correct texts #171

Closed
iSimorgh opened this issue Nov 22, 2020 · 14 comments
Closed

Spell-check not working in correct texts #171

iSimorgh opened this issue Nov 22, 2020 · 14 comments

Comments

@iSimorgh
Copy link

I got the following error report and the program asked me to report it.
I hope it could be of any help.
Great app.

Traceback

File: /usr/lib/python3.6/site-packages/gaupol/util.py
Line: 44
In: call_function

    function(*args, **kwargs)

File: /usr/lib/python3.6/site-packages/gaupol/assistants.py
Line: 1036
In: _correct_texts

    page.correct_texts(dummy, rows, doc)

File: /usr/lib/python3.6/site-packages/gaupol/assistants.py
Line: 561
In: correct_texts

    return self._show_error_dialog(str(error))

File: /usr/lib/python3.6/site-packages/gaupol/assistants.py
Line: 600
In: _show_error_dialog

    dialog = gaupol.ErrorDialog(self.get_parent(), title, message)

File: /usr/lib/python3.6/site-packages/gaupol/dialogs/message.py
Line: 37
In: init

    text=title)

File: /usr/lib64/python3.6/site-packages/gi/overrides/init.py
Line: 319
In: new_init

    return super_init_func(self, **new_kwargs)

File: /usr/lib64/python3.6/site-packages/gi/overrides/Gtk.py
Line: 575
In: init

    self._init(*args, **new_kwargs)

File: /usr/lib64/python3.6/site-packages/gi/overrides/init.py
Line: 319
In: new_init

    return super_init_func(self, **new_kwargs)

File: /usr/lib64/python3.6/site-packages/gi/overrides/Gtk.py
Line: 521
In: init

    _window_init(self, *args, **kwargs)

File: /usr/lib64/python3.6/site-packages/gi/overrides/init.py
Line: 319
In: new_init

    return super_init_func(self, **new_kwargs)

TypeError: could not convert value for property `transient_for' from Box to GtkWindow

Environment

Platform: Linux-5.3.18-lp152.50-default-x86_64-with-glibc2.3.4
Locale: en_US.utf_8

Versions

aeidon: 1.8
chardet: 3.0.4
gaupol: 1.8
gspell: 1
gstreamer: 1.16.2.0
gtk+: 3.24.20
pygobject: 3.34.0
python: 3.6.10

@otsaloma
Copy link
Owner

Thanks, this helps.

@iSimorgh
Copy link
Author

iSimorgh commented Nov 22, 2020

Thank you @otsaloma for your response.
Should I uninstall using openSUSE's software manager and install from github, or is there something else I can change to make it work?
Would installing from github help so at least I can use the application?
Thank you in advance.

@otsaloma
Copy link
Owner

Yeah, sorry, I forgot to explain. This error comes from trying to show an error dialog that a spell check dictionary isn't working. So, the easiest fix for you would be that you first go to Tools / Configure Spell-Check and select a language there and if you then try again Tools / Correct Texts, it should hopefully work.

@iSimorgh
Copy link
Author

Thank you for your reply @otsaloma
I used gaupol on openSUSE leap 15.1 with no problem. I don't remember the version though. But now, after a clean install of openSUSE leap 15.2 I am trying to install all my apps without using any other config files from previous /home so everything is fresh.
The challenge I am facing with gaupol is now after even going through what you mentioned in the previous post, (even though it was already a language selected i.e. English) the application hangs, if I choose to 'split words not found in spell-check dictionary'. And if I don't tick for that option, the 'correcting texts' won't find anything not even 'speaker before a colon'.
Appreciate any help.

@otsaloma
Copy link
Owner

It sounds like there's something wrong with the spell-check engine or dictionary. If you go to Tools / Spell-Check, does that fail too? If so, I recommend you file a bug report against the openSUSE package. It might be missing the gspell dependency, or something else wrong.

@iSimorgh
Copy link
Author

Tools / Check Spelling works on its own.
Should I uninstall and install from github?

@otsaloma otsaloma reopened this Nov 23, 2020
@otsaloma otsaloma changed the title Something went wrong Spell-check not working in correct texts Nov 23, 2020
@otsaloma
Copy link
Owner

I can actually reproduce that hang with spell-check split words. I'll look into it.

@otsaloma
Copy link
Owner

Fixed now that issue, it has probably been broken since switching spell-check to use gspell.

To get this fix into use, you can download the latest source code and install as instructed in the README file. You might want to keep your current installation too as that will keep the dependencies installed. If you install as instructed (--prefix=/usr/local) it will go to /usr/local and on most systems that should take precendence over the package manager installation which is likely in /usr.

@iSimorgh
Copy link
Author

Thank you for your reply.
I will try this now. Haven't been able to get to work at all.
Will report back.

@iSimorgh
Copy link
Author

iSimorgh commented Nov 24, 2020

@otsaloma
I installed without uninstalling the existing by doing:
sudo python3 setup.py install --prefix=/usr/local
while installing this is the only fail item that I see:
...
...
compiling locale/tr/LC_MESSAGES/gaupol.mo
msgfmt: cannot locate ITS rules for data/io.otsaloma.gaupol.appdata.xml.in
command 'msgfmt --xml -d po --template data/io.otsaloma.gaupol.appdata.xml.in -o data/io.otsaloma.gaupol.appdata.xml' failed
creating /usr/local/share/gaupol
...
...
then I ran:
/usr/local/bin/gaupol

In the application chose 'split words....' then this is what I got in the terminal and the application hung:
/usr/lib/python3.6/site-packages/gaupol/renderers/time.py:46: Warning: g_value_get_int: assertion 'G_VALUE_HOLDS_INT (value)' failed editor.set_text(self.props.text)

and if I don't choose split words, then the application doesn't find any error at all. Even when I know there are plenty of errors in the *.srt file

@iSimorgh
Copy link
Author

I figured the *.srt file might be corrupt after experimenting with it so many times or something wrong with it. So I tried with another one, and it worked.
But the 'split words...' still hangs the application.

@otsaloma
Copy link
Owner

the I ran:
/usr/local/bin/gaupol

then in the application chose 'split words....' then this is what I got in the terminal and the application hung:
/usr/lib/python3.6/site-packages/gaupol/renderers/time.py:46: Warning: g_value_get_int: assertion 'G_VALUE_HOLDS_INT (value)' failed editor.set_text(self.props.text)

It seems you're running the executable from /usr/local but it's loading code from /usr, which is what you have installed via your distro's package manager. Your system seems to be setup so that my advice of not uninstall first doesn't work. So, you might need to uninstall the openSUSE package and then install the needed dependencies manually. The dependencies (openSUSE package names) are listed in the spec file.

@iSimorgh
Copy link
Author

Thank you for your reply @otsaloma
Are these the requirements? :
BuildRequires: fdupes
BuildRequires: gobject-introspection
BuildRequires: hicolor-icon-theme
BuildRequires: python3-devel
BuildRequires: python3-gobject >= 3.12
Requires: python3
Requires: python3-aeidon
Requires: python3-gobject >= 3.12
Recommends: iso-codes >= 3.67
Recommends: python3-chardet
BuildRequires: myspell-en_US
BuildRequires: python3-chardet
BuildRequires: python3-pytest
BuildRequires: typelib(Gspell) >= 1

Thanks

@otsaloma
Copy link
Owner

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants