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

various errors in linux #7

Closed
ijgnd opened this issue Jun 14, 2019 · 3 comments
Closed

various errors in linux #7

ijgnd opened this issue Jun 14, 2019 · 3 comments

Comments

@ijgnd
Copy link

ijgnd commented Jun 14, 2019

I don't know if this is interesting for you since I didn't use your compiled version but I ran from source in Fedora 30 which still has python3-PyQt4-webkit. I just wanted to see the speed difference for long cards during review. Maybe these errors are platform specific. If so don't waste your time on these.

On Linux besides the files from requirements.txt I also needed jsonschema and six

 

P.S.: One of the main reasons you stated for creating CCBC is that Anki 2.1 is slow for incremental reading. CCBC is a lot of work and still you created it. So you must love incremental reading. I'm very eager to see your workflow. I think you haven't published this anywhere? I'm sure other people would benefit, too.

I also like IR and I don't use the Anki incremental reading add-on because for me IR always means heavily editing the text. Since I saw the "Edit Field during Review" add-on in January I want to achieve this with a wysiwyg editor for use during reviews, see e.g. here. As an editor I use tinymce. So far I haven't managed to reliably load it into the anki reviewer. At the moment I think I'll use a separate window which would make it easier to adjust the decks I send my extracts to and how I schedule them. I still work on these features - so far only the window that loads and displays a card is finished: extended table editor. This can be opened from the editor to modify the contents of a field.

I got this error when I tried to copy & paste the article about Tokyo (the Capital) from the english wikipedia into CCBC. While I saw the image processing progress dialogs I got:

Error
An error occurred. Please use Tools > Check Database to see if that fixes the problem. 
If problems persist, you are SOL.
Anki 2.1.13_ccbc (eef86bf3) Python 3.7.3 Qt 4.8.7 PyQt 4.12.3
Platform: Linux
Flags: frz=False ao=False sv=1

Caught exception:
  File "/home/myuser/CCBC/aqt/editor.py", line 185, in <lambda>
    s.connect(s, SIGNAL("activated()"), lambda:self.web.onPaste(True))
  File "/home/myuser/CCBC/aqt/editor.py", line 887, in onPaste
    mime = self.mungeClip()
  File "/home/myuser/CCBC/aqt/editor.py", line 944, in mungeClip
    mime = self._processMime(mime)
  File "/home/myuser/CCBC/aqt/editor.py", line 974, in _processMime
    return self._processHtml(mime)
  File "/home/myuser/CCBC/aqt/editor.py", line 1050, in _processHtml
    html = self.editor._filterHTML(html, localize=True)
  File "/home/myuser/CCBC/aqt/editor.py", line 774, in _filterHTML
    fname = self.urlToFile(src)
  File "/home/myuser/CCBC/aqt/editor.py", line 643, in urlToFile
    return self._retrieveURL(url)
  File "/home/myuser/CCBC/aqt/editor.py", line 684, in _retrieveURL
    filecontents = urllib.request.urlopen(req).read()
  File "/usr/lib64/python3.7/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib64/python3.7/urllib/request.py", line 525, in open
    response = self._open(req, data)
  File "/usr/lib64/python3.7/urllib/request.py", line 543, in _open
    '_open', req)
  File "/usr/lib64/python3.7/urllib/request.py", line 503, in _call_chain
    result = func(*args)
  File "/usr/lib64/python3.7/urllib/request.py", line 1360, in https_open
    context=self._context, check_hostname=self._check_hostname)
  File "/usr/lib64/python3.7/urllib/request.py", line 1317, in do_open
    encode_chunked=req.has_header('Transfer-encoding'))
  File "/usr/lib64/python3.7/http/client.py", line 1244, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib64/python3.7/http/client.py", line 1255, in _send_request
    self.putrequest(method, url, **skips)
  File "/usr/lib64/python3.7/http/client.py", line 1122, in putrequest
    self._output(request.encode('ascii'))
<class 'UnicodeEncodeError'>: 'ascii' codec can't encode characters in position 34-45: ordinal not in range(128)

After closing this warning when I try to close the add dialog I get another error. I think at this time I had already closed the main window. But this same error message sometimes also appears if during reviews I click on Add and add some notes and try to close the window.

Error
An error occurred. Please use Tools > Check Database to see if that fixes the problem. 
If problems persist, you are SOL.
Anki 2.1.13_ccbc (eef86bf3) Python 3.7.3 Qt 4.8.7 PyQt 4.12.3
Platform: Linux
Flags: frz=False ao=False sv=?

Caught exception:
  File "/home/myuser/CCBC/aqt/addcards.py", line 234, in reject
    self.editor.setNote(None)
  File "/home/myuser/CCBC/aqt/editor.py", line 319, in setNote
    self.hideCompleters()
  File "/home/myuser/CCBC/aqt/editor.py", line 488, in hideCompleters
    self.tags.hideCompleter()
  File "/home/myuser/CCBC/aqt/tagedit.py", line 85, in hideCompleter
    if sip.isdeleted(self.completer):
<class 'TypeError'>: isdeleted() argument 1 must be sip.simplewrapper, not TagCompleter
@lovac42
Copy link
Owner

lovac42 commented Jun 14, 2019

That's the problem with using old packages and why dae is moving towards Py3 and QT5. I had a hard time hunting down these packages and making them work for windows. But that's because I have a personal reason for them as all my codes are tied to webkit.

Re: P.S. Alot of my addons have not been released, it would need to be rewritten in a more user friendly way. https://www.dropbox.com/sh/3x5w262cm4n26su/AAA28vSoifxxU9UEQmWVnkjga/ducktape.avi?dl=0

@ijgnd
Copy link
Author

ijgnd commented Jun 15, 2019

Thanks for taking your time to make such a detailed and highly informative video. The features are just amazing! I've always assumed that you must have some customization but would never have guessed that you have such an elaborate system.

I had to think about a reply. Maybe (probably?) I should just wait until you release a version of your add-ons: Your system seems to offer all the features I want and so much more. Did I mention that your workflow is amazing ...

I think many people would benefit from a better add-on for Incremental Reading add-on and I think that a small group of dedicated users should profit from any version of your add-on ... So I really hope for a release ...

About my bugs from this thread: For now I've switched to a windows VM. Should I close my two threads?

@lovac42
Copy link
Owner

lovac42 commented Jun 16, 2019

You can leave it open, I'll close them later as they are valid bugs.

I think only a few IR users would understand the video or what it entails. Most of the ideas came from SM blogs and my own workflow from using adobe reader for many years. There would need to be a major rewrite as the code is tied to python 2.6 so I am not in a rush to code it. As for release, I will keep it in the Anki Elite Club (to be created), the QA from newbies would probably kill me.

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