Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Hi. How can I fix it :'QFontMetrics' object has no attribute 'width' #64

Open
sinahgh opened this issue Nov 23, 2022 · 1 comment
Open

Comments

@sinahgh
Copy link

sinahgh commented Nov 23, 2022

Debug info:
Anki 2.1.54 (b6a7760c) Python 3.9.7 Qt 6.3.1 PyQt 6.3.1
Platform: Windows 10
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2022-11-23 16:31:32

Caught exception:
Traceback (most recent call last):
File "C:\Users\s.haghani.PDD0\AppData\Roaming\Anki2\addons21\814349176\awesometts\gui\common.py", line 121, in _show
self._instance = self._target.constructor(
File "C:\Users\s.haghani.PDD0\AppData\Roaming\Anki2\addons21\814349176\awesometts\gui\generator.py", line 59, in init
super(BrowserGenerator, self).init(
File "C:\Users\s.haghani.PDD0\AppData\Roaming\Anki2\addons21\814349176\awesometts\gui\base.py", line 243, in init
super(ServiceDialog, self).init(*args, **kwargs)
File "C:\Users\s.haghani.PDD0\AppData\Roaming\Anki2\addons21\814349176\awesometts\gui\base.py", line 80, in init
self.setLayout(self._ui())
File "C:\Users\s.haghani.PDD0\AppData\Roaming\Anki2\addons21\814349176\awesometts\gui\base.py", line 255, in _ui
hor.addLayout(self._ui_services())
File "C:\Users\s.haghani.PDD0\AppData\Roaming\Anki2\addons21\814349176\awesometts\gui\base.py", line 313, in _ui_services
layout.addLayout(self._ui_services_presets())
File "C:\Users\s.haghani.PDD0\AppData\Roaming\Anki2\addons21\814349176\awesometts\gui\base.py", line 340, in _ui_services_presets
save.setFixedWidth(save.fontMetrics().width(save.text()) + 20)
AttributeError: 'QFontMetrics' object has no attribute 'width'

@kelciour
Copy link
Owner

For now either by installing Anki 2.1.54 Qt5 or AwesomeTTS - Add speech to your flashcards - https://ankiweb.net/shared/info/1436550454

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

No branches or pull requests

2 participants