Closed 1337-537h closed 2 years ago
Few questions:
What was the search query that produced the error?
Greek letters/words But in previous versions the problem wasn't there.
Can you give a specific instance of a query that raises error? Trying with Greek or Cyrillic or Kanji letters myself works successfully.
First example: "νομιζω ειχα πεθάνει"
Does the message itself display fine in chat history, the message that contains this text?
Can you give the contents of the matching message?
The message appears itself fine in the history but not when im trying to search the keywords.
Can you give the contents of the matching message?
no, can i help you differently?
A round of 20 questions, then :)
everything is normal no big text in every line nothing special.. But the log (main.db) are big 200MB 300MB.. characters are greek and english (latin) some searches return results some return the error i post above.
Can you respond to questions 1 and 4?
Difficult to track this problem down without specific information..
Can you try the following:
dc = wx.MemoryDC()
dc.SetFont(wx.Font(8, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, faceName=conf.HistoryFontName))
width = page.html_searchall.Size.width * 5 // 9
from wx.lib.wordwrap import wordwrap
And then see what are the results when you try invoking the following statement with different texts:
```python
wordwrap("YOURTEXT", width, dc)
And now replace YOURTEXT with the contents of the message, whole and different parts of it, to see when and how the error occurs.
Im not sure if i did it correctly.
`2022-05-03 21:51:32.914 An unexpected error has occurred:
Traceback (most recent call last):
File "code.py", line 90, in runcode
File "<input>", line 1, in <module>
NameError: name 'ειχα' is not defined
2022-05-03 21:52:23.848 An unexpected error has occurred:
Traceback (most recent call last):
File "code.py", line 90, in runcode
File "<input>", line 1, in <module>
NameError: name 'test' is not defined`
You need to put the text in quotes, like
wordwrap("ειχα", width, dc)
@1337-537h Are you still interested in getting this resolved?
sure but i can do nothing.
Well, what were the results of trying https://github.com/suurjaak/Skyperious/issues/108#issuecomment-1116299215 ?
I think i did that when you told me and i reply you what happend.
In https://github.com/suurjaak/Skyperious/issues/108#issuecomment-1116556456 I gave further guidance on how to test the different parts of the problematic text.
Can you identify a minimal text that raises this error, and that you are willing to share?
I remember that happens when i search this word "ειχα" But that appears in so many entries. The main.db file is over 300mb. https://i.imgur.com/WjUGCTm.png https://i.imgur.com/85b9X2C.png
I think you misunderstood the guidance. After the from wx.lib.wordwrap import wordwrap
, you should now write
wordwrap("ειχα", width, dc)
Replacing ειχα
with the message text that is causing this error. Does it raise the error here also?
same thing after that too. https://i.imgur.com/BFtUP6h.png
Ok, how about you try this:
wordwrap_original = wx.lib.wordwrap.wordwrap
def wordwrap_logged(text, width, dc, breakLongWords=True, margin=0):
try: return wordwrap_original(text, width, dc, breakLongWords, margin)
except Exception as e:
main.logger.info("ERROR WRAPPING %r: %s", text, e)
raise
wx.lib.wordwrap.wordwrap = wordwrap_logged
And then try searching again with a text that raises error. This will print the exact problematic text to the Skyperious log window (menu Help -> Show log window).
I didn't spot any difference.. https://i.imgur.com/ahbA8w2.png
You seemed to have missed pasting the last line:
wx.lib.wordwrap.wordwrap = wordwrap_logged
What you mean? I did it, you can see it in the sreenshot. I did it and its the same as the above screen.
In Python console i put:
Right, it's there, but it should be on a separate line - in the screenshot it has become part of the wordwrap_logged
function definition.
How do to that? I don't know how..
Just copy-paste the blocks one by one, pressing Enter a few times in between. First:
wordwrap_original = wx.lib.wordwrap.wordwrap
Then:
def wordwrap_logged(text, width, dc, breakLongWords=True, margin=0):
try: return wordwrap_original(text, width, dc, breakLongWords, margin)
except Exception as e:
main.logger.info("ERROR WRAPPING %r: %s", text, e)
raise
And then:
wx.lib.wordwrap.wordwrap = wordwrap_logged
The trick was to press enter two times in the second command. But i didn't notice any diference.. https://i.imgur.com/lWyPvsF.png
Can you show a more complete screenshot of the log window?
Ok, so the error information gets logged now.
Can you show me the precise value that got ERROR WRAPPING?
nooo.. its just a greek text.. is there any other way that can i help you?
Is all of it Greek text? If not, you can replace Greek letters with X.
Thats another greek word that popup the same error that i can share the screenshot. https://i.imgur.com/9VmA6xx.png
I search for the word "τεστ" (test in greek)
Aha, got it. The problem comes up with text emoticons.
Thank you, this gives me enough information to try fixing it.
Good news finally.
Should be fixed in the newly released v5.2 - can you confirm?
Problem should be solved, no more feedback for 2 weeks - closing issue.
Traceback (most recent call last): File "skyperious\workers.py", line 276, in run File "skyperious\skypedata.py", line 1849, in parse File "skyperious\skypedata.py", line 2341, in dom_to_html File "skyperious\workers.py", line 143, in
File "wx\lib\wordwrap.py", line 36, in wordwrap
IndexError: string index out of range