Author Topic: VrrtepCLI  (Read 21002 times)

0 Members and 1 Guest are viewing this topic.

Offline Tirea Aean

  • The Blue One
  • Olo'eyktan Anawm
  • Palulukan Makto
  • *****
  • *
  • *
  • *
  • Posts: 9902
  • nv Eywa'eveng
  • Karma: 243
  • Oeri ran lu srung
    • Tirea Aean
Re: VrrtepCLI
« Reply #200 on: June 06, 2011, 07:09:06 pm »
i've also encountered an anagram while playing scramble. lor and rol.(i put lor answer was rol)  im at a loss of how or if i can fix that.
Can't be fixed easily. It's doable, but in my experience, the code to do this can make programs extremely slow.
It doesn't have to be slow. Here's a possiblility: at the beginning, create a set of all words in addition to the list (wordset = set(wordlist)). Instead of checking that the user entered the chosen word, check that the user entered any Na'vi word and that it's an anagram of the chosen word (a in wordset and sorted(a) == sorted(word)). So it might pick rol, show olr, but both lor and rol would be accepted.

but theoretically, any other scrambled version of that could be a "valid anagram" how does it know that olr and rlo are not words but rol and lor are, when orl is displayed?

EDIT: just kidding. I get it. I see what you did there. Yeah, that is a possibility. I'll see if I can work on that.
« Last Edit: June 06, 2011, 07:10:59 pm by Tirea Aean »

kelku ikranä a hawnventi yom podcast (na'vi-only): https://tirearadio.com/podcast
Learn Na'vi Discord Chat: https://discord.gg/WF6qcmv

Offline Blue Elf

  • Palulukan Makto
  • *****
  • *
  • *
  • Posts: 5499
  • cz Czech Republic
  • Karma: 112
    • My attempt for blog
Re: VrrtepCLI
« Reply #201 on: June 21, 2011, 08:33:29 am »
Hello guys, I was using vrrtepCli for some time without problems, but today I fall into problems.
I'm using version 1.9 (not sure if newer one is available), playing quiz game. Usually up to 100 questions, no problem. Today program crashed down 2 times (somewhere at 50th round). attaching console output:
Code: [Select]
Word: Traceback (most recent call last):
  File "vrrtepcli.py", line 321, in <module>
  File "vrrtepcli.py", line 302, in main
  File "quiz.pyc", line 86, in quiz
  File "encodings\cp437.pyc", line 12, in encode
UnicodeEncodeError: 'charmap' codec can't encode character u'\xcc' in position 1
: character maps to <undefined>
And the second:
Code: [Select]
Word: nemrey

1 - sting
2 - Traceback (most recent call last):
  File "vrrtepcli.py", line 321, in <module>
  File "vrrtepcli.py", line 302, in main
  File "quiz.pyc", line 101, in quiz
  File "encodings\cp437.pyc", line 12, in encode
UnicodeEncodeError: 'charmap' codec can't encode character u'\x92' in position 2
2: character maps to <undefined>
Recently I tried to update dictionaries, there was a problem to get some of them, but at the second attempt everything was ok.
Any ideas? Using Windows XP 32 bit
Oe lu skxawng skxakep. Slä oe nerume mi.
"Oe tasyätxaw ulte koren za'u oehu" (Limonádový Joe)


Offline Tirea Aean

  • The Blue One
  • Olo'eyktan Anawm
  • Palulukan Makto
  • *****
  • *
  • *
  • *
  • Posts: 9902
  • nv Eywa'eveng
  • Karma: 243
  • Oeri ran lu srung
    • Tirea Aean
Re: VrrtepCLI
« Reply #202 on: June 21, 2011, 08:40:02 am »
thts just for windows version having to do with cp 437 encodings i think. !summon SwokaIkran

also the dictionaries wil be updated tonight for this as the main LN dict has been updated.
« Last Edit: June 21, 2011, 08:42:31 am by Tirea Aean »

kelku ikranä a hawnventi yom podcast (na'vi-only): https://tirearadio.com/podcast
Learn Na'vi Discord Chat: https://discord.gg/WF6qcmv

Offline Swoka Ikran

  • Palulukan Makto
  • *****
  • *
  • Posts: 1642
  • Karma: 29
Re: VrrtepCLI
« Reply #203 on: June 21, 2011, 11:59:05 am »
Hello guys, I was using vrrtepCli for some time without problems, but today I fall into problems.
I'm using version 1.9 (not sure if newer one is available), playing quiz game. Usually up to 100 questions, no problem. Today program crashed down 2 times (somewhere at 50th round). attaching console output:
Recently I tried to update dictionaries, there was a problem to get some of them, but at the second attempt everything was ok.
Any ideas? Using Windows XP 32 bit
The code itself hasn't changed in almost a month.

Since the problem occurred after a dictionary update, those errors are likely caused by malformed dictionaries. There's no dictionary validation in-program, so anything wrong with it will break the program.

Somewhere in the dict, there's characters (the \x92 and \xcc) that are not valid as UTF-8. Either they're orphaned (missing their second part), are part of characters that aren't valid unicode, or are part of characters not printable in a standard CP437 console window (which we shouldn't have in this app).

For the time being, delete your dictionaries and get the old ones from the release package.

@TA: Since you plan to update them anyway: check the dictionary and remove unicode that's not part of ì ä é characters.
2010 was the year of the Na'vi.Vivar 'ivong Na'vi!

 
Avatray | NWOTD Sigbars | Sacred's Sigbar Tool | My collection of Avatar merchandise

Offline Blue Elf

  • Palulukan Makto
  • *****
  • *
  • *
  • Posts: 5499
  • cz Czech Republic
  • Karma: 112
    • My attempt for blog
Re: VrrtepCLI
« Reply #204 on: June 21, 2011, 02:32:39 pm »
yes, I also think that problem can be in the update. Finally I did another update, all files were downloaded correctly and I was able to take my regular hundred of words without problem....
Maybe download could be done in "transaction" - get newer dictionaries into temp folder and if all files succeed, move them in correct location. Now data are deleted first, then downloaded. And if error occurs.... :(
Oe lu skxawng skxakep. Slä oe nerume mi.
"Oe tasyätxaw ulte koren za'u oehu" (Limonádový Joe)


Offline Swoka Ikran

  • Palulukan Makto
  • *****
  • *
  • Posts: 1642
  • Karma: 29
Re: VrrtepCLI
« Reply #205 on: June 21, 2011, 03:43:04 pm »
Maybe download could be done in "transaction" - get newer dictionaries into temp folder and if all files succeed, move them in correct location. Now data are deleted first, then downloaded. And if error occurs.... :(
That can be done. :) If WGET succeeds on all files, move into place.

The problem is that this still won't catch files that download fine, but were corrupted during transfer. I'd need to add some form of integrity checking for that.
2010 was the year of the Na'vi.Vivar 'ivong Na'vi!

 
Avatray | NWOTD Sigbars | Sacred's Sigbar Tool | My collection of Avatar merchandise

Offline Tirea Aean

  • The Blue One
  • Olo'eyktan Anawm
  • Palulukan Makto
  • *****
  • *
  • *
  • *
  • Posts: 9902
  • nv Eywa'eveng
  • Karma: 243
  • Oeri ran lu srung
    • Tirea Aean
Re: VrrtepCLI
« Reply #206 on: June 21, 2011, 04:11:39 pm »
but the thing is, NOTHING AT ALL has changed. I STILL have yet to change anything in any dictionary file. what you downloaded with the update function just re-downloaded what you already had before. ie I havent changed the dicts for this program for about 2 or 3 Markì-updates back in the Dictionary Part II thread...

EDIT: As I update, I'll still check for those two partial chars

DOUBLE EDIT: just to be clear:

Python sees:

"ì" == "\xc3\xac"
"ä" == "\xc3\xa4"
"é" == "\xc3\xa9"

so really, the \x92 and \xcc things I have NO IDEA where they are coming from... /me investigates
« Last Edit: June 21, 2011, 04:16:59 pm by Tirea Aean »

kelku ikranä a hawnventi yom podcast (na'vi-only): https://tirearadio.com/podcast
Learn Na'vi Discord Chat: https://discord.gg/WF6qcmv

Offline Tirea Aean

  • The Blue One
  • Olo'eyktan Anawm
  • Palulukan Makto
  • *****
  • *
  • *
  • *
  • Posts: 9902
  • nv Eywa'eveng
  • Karma: 243
  • Oeri ran lu srung
    • Tirea Aean
Re: VrrtepCLI
« Reply #207 on: June 21, 2011, 04:22:14 pm »
after some curious python intepreter play:


EDIT: after further messing, these two "mystery unicode snippets" have not been adding to anything here. Z is just \x5a and j is just \x7a and z is just \x7a the \xcc did not add anything. :\

DOUBLE EDIT: However, we ARE onto something here with

>>> print "\xc3\x92"
Ò
« Last Edit: June 21, 2011, 04:27:18 pm by Tirea Aean »

kelku ikranä a hawnventi yom podcast (na'vi-only): https://tirearadio.com/podcast
Learn Na'vi Discord Chat: https://discord.gg/WF6qcmv

Offline Swoka Ikran

  • Palulukan Makto
  • *****
  • *
  • Posts: 1642
  • Karma: 29
Re: VrrtepCLI
« Reply #208 on: June 21, 2011, 04:52:06 pm »
I wonder if his downloads might have gotten corrupted in transfer the first time around...
2010 was the year of the Na'vi.Vivar 'ivong Na'vi!

 
Avatray | NWOTD Sigbars | Sacred's Sigbar Tool | My collection of Avatar merchandise

Offline Kä'eng

  • Uniltìranyu
  • **
  • Posts: 133
  • Karma: 12
Re: VrrtepCLI
« Reply #209 on: June 21, 2011, 05:02:09 pm »
u'\xcc' is Ì, which is in the word 'Ìnglìsì in naviWords.txt. u'\x92' is ’ (right single quote), which is present in two lines of eng.txt:
"be busy (negative sense): be tired out and overwhelmed by an activity that’s keeping one busy"
"in a fashion as if one’s life were at stake"
Since these characters are not in CP437, you get an error trying to print them to the console.
Ma evi, ke'u ke lu prrte' to fwa sim tuteot ayawne.
Slä txo tuteo fmi 'ivampi ngat ro seng, fu nìfya'o, a 'eykefu ngati vä', tsakem ke lu sìltsan.
Tsaw lu ngeyä tokx! Kawtu ke tsun nìmuiä 'ivampi ngat txo ngal ke new tsakemit.
Ha kempe si nga? Nì'awve, nga plltxe san kehe. Tsakrr, ngal tsatsengti hum!

Offline Tirea Aean

  • The Blue One
  • Olo'eyktan Anawm
  • Palulukan Makto
  • *****
  • *
  • *
  • *
  • Posts: 9902
  • nv Eywa'eveng
  • Karma: 243
  • Oeri ran lu srung
    • Tirea Aean
Re: VrrtepCLI
« Reply #210 on: June 21, 2011, 05:12:47 pm »
I wonder if his downloads might have gotten corrupted in transfer the first time around...

This is possible... Which reminds me... I'll post here after I update all the dictionary files.

kelku ikranä a hawnventi yom podcast (na'vi-only): https://tirearadio.com/podcast
Learn Na'vi Discord Chat: https://discord.gg/WF6qcmv

Offline Swoka Ikran

  • Palulukan Makto
  • *****
  • *
  • Posts: 1642
  • Karma: 29
Re: VrrtepCLI
« Reply #211 on: June 21, 2011, 05:27:34 pm »
u'\xcc' is Ì, which is in the word 'Ìnglìsì in naviWords.txt. u'\x92' is ’ (right single quote), which is present in two lines of eng.txt:
"be busy (negative sense): be tired out and overwhelmed by an activity that’s keeping one busy"
"in a fashion as if one’s life were at stake"
Since these characters are not in CP437, you get an error trying to print them to the console.
That explains the errors :)

I guess TA should change the ’ with a ', and change the Ì to a lowercase ì.

Also...I rewrote the updater and am debugging it now. It asks before installing updates and offers to try again if any of the 11 files fail during download.

One thing I discovered in the process: you never published an est.txt file on tirea.skxawng.lu
2010 was the year of the Na'vi.Vivar 'ivong Na'vi!

 
Avatray | NWOTD Sigbars | Sacred's Sigbar Tool | My collection of Avatar merchandise

Offline Tirea Aean

  • The Blue One
  • Olo'eyktan Anawm
  • Palulukan Makto
  • *****
  • *
  • *
  • *
  • Posts: 9902
  • nv Eywa'eveng
  • Karma: 243
  • Oeri ran lu srung
    • Tirea Aean
Re: VrrtepCLI
« Reply #212 on: June 21, 2011, 06:01:35 pm »
Noted. I will make all these changes tonight when I have time.

kelku ikranä a hawnventi yom podcast (na'vi-only): https://tirearadio.com/podcast
Learn Na'vi Discord Chat: https://discord.gg/WF6qcmv

Offline Swoka Ikran

  • Palulukan Makto
  • *****
  • *
  • Posts: 1642
  • Karma: 29
Re: VrrtepCLI
« Reply #213 on: June 21, 2011, 06:06:59 pm »
At the est.txt issue: Turns out the file is there after all. When you made the original linux updater, you wrote /soruce/ instead of /source/ in the WGET for est.txt. Since my Windows version was a port of the linux version, I didn't catch the error until now.

I've fixed it in the Windows version and will commit later.
2010 was the year of the Na'vi.Vivar 'ivong Na'vi!

 
Avatray | NWOTD Sigbars | Sacred's Sigbar Tool | My collection of Avatar merchandise

Offline Tirea Aean

  • The Blue One
  • Olo'eyktan Anawm
  • Palulukan Makto
  • *****
  • *
  • *
  • *
  • Posts: 9902
  • nv Eywa'eveng
  • Karma: 243
  • Oeri ran lu srung
    • Tirea Aean
Re: VrrtepCLI
« Reply #214 on: June 21, 2011, 06:11:44 pm »
At the est.txt issue: Turns out the file is there after all. When you made the original linux updater, you wrote /soruce/ instead of /source/ in the WGET for est.txt. Since my Windows version was a port of the linux version, I didn't catch the error until now.

I've fixed it in the Windows version and will commit later.

That means I will also need to do that for the linux version and commit as well. good catch.

EDIT: found "soruce" fail in updater script and fixed. will commit after making notes on the LN dict thread and making the changes.
« Last Edit: June 21, 2011, 10:31:59 pm by Tirea Aean »

kelku ikranä a hawnventi yom podcast (na'vi-only): https://tirearadio.com/podcast
Learn Na'vi Discord Chat: https://discord.gg/WF6qcmv

Offline Swoka Ikran

  • Palulukan Makto
  • *****
  • *
  • Posts: 1642
  • Karma: 29
Re: VrrtepCLI
« Reply #215 on: June 22, 2011, 12:30:13 am »
Not sure where your commit is, so I committed my changes. r7 (Windows): Updater updated.

Also, just to let you know, I may not be around Wed. or Thurs, because I'm not sure if I'll be able to find wifi at my grandparents. If I can, I'll make an attempt to read this.
2010 was the year of the Na'vi.Vivar 'ivong Na'vi!

 
Avatray | NWOTD Sigbars | Sacred's Sigbar Tool | My collection of Avatar merchandise

Offline Tirea Aean

  • The Blue One
  • Olo'eyktan Anawm
  • Palulukan Makto
  • *****
  • *
  • *
  • *
  • Posts: 9902
  • nv Eywa'eveng
  • Karma: 243
  • Oeri ran lu srung
    • Tirea Aean
Re: VrrtepCLI
« Reply #216 on: June 22, 2011, 12:51:37 am »
the commit will most likely be there tomorrow. or later today. depends when you are reading this and where you are in the world.

kelku ikranä a hawnventi yom podcast (na'vi-only): https://tirearadio.com/podcast
Learn Na'vi Discord Chat: https://discord.gg/WF6qcmv

Offline Swoka Ikran

  • Palulukan Makto
  • *****
  • *
  • Posts: 1642
  • Karma: 29
Re: VrrtepCLI
« Reply #217 on: June 22, 2011, 01:23:42 am »
the commit will most likely be there tomorrow. or later today. depends when you are reading this and where you are in the world.
OK. I'll probably have to get it on Friday.

(Oh, and it's later today for me :) )
« Last Edit: June 22, 2011, 01:25:32 am by Swoka Ikran »
2010 was the year of the Na'vi.Vivar 'ivong Na'vi!

 
Avatray | NWOTD Sigbars | Sacred's Sigbar Tool | My collection of Avatar merchandise

Offline Blue Elf

  • Palulukan Makto
  • *****
  • *
  • *
  • Posts: 5499
  • cz Czech Republic
  • Karma: 112
    • My attempt for blog
Re: VrrtepCLI
« Reply #218 on: June 22, 2011, 04:05:44 am »
Some strange behavior:
Code: [Select]
C:\WINDOWS>vrrtepcli tìlam

C:\WINDOWS>echo off
Vrrtep CLI v1.9 by Tirea Aean. run 'vrrtepcli -h' for usage.
Windows version by Swoka Ikran
Standalone version

Not Found
but:
Code: [Select]
C:\WINDOWS>vrrtepcli -l appearance

C:\WINDOWS>echo off
Vrrtep CLI v1.9 by Tirea Aean. run 'vrrtepcli -h' for usage.
Windows version by Swoka Ikran
Standalone version

Query matches:
n. tìlam
Can you check why tìlam is not found? Seems that Windows have problem with ì, words with ä are found...
Oe lu skxawng skxakep. Slä oe nerume mi.
"Oe tasyätxaw ulte koren za'u oehu" (Limonádový Joe)


Offline Tirea Aean

  • The Blue One
  • Olo'eyktan Anawm
  • Palulukan Makto
  • *****
  • *
  • *
  • *
  • Posts: 9902
  • nv Eywa'eveng
  • Karma: 243
  • Oeri ran lu srung
    • Tirea Aean
Re: VrrtepCLI
« Reply #219 on: June 22, 2011, 10:00:32 am »
I get


tirea@tirea:~$ vrrtepcli tìlam
Vrrtep CLI v1.91 by Tirea Aean. run 'vrrtepcli -h' for usage.

n. appearance

tirea@tirea:~$ vrrtepcli -l appearance
Vrrtep CLI v1.91 by Tirea Aean. run 'vrrtepcli -h' for usage.

Query matches:
n. tìlam


It's either locale or unicode failure. >.<

(I <3 Ubuntu)

EDIT: Linux 1.91 is not much different than 1.9:
Quote from: ChangeLog.txt
v1.91
repeat looping now works on command line.

v1.9
[...]
« Last Edit: June 22, 2011, 10:04:53 am by Tirea Aean »

kelku ikranä a hawnventi yom podcast (na'vi-only): https://tirearadio.com/podcast
Learn Na'vi Discord Chat: https://discord.gg/WF6qcmv

 

Become LearnNavi's friend on Facebook Follow LearnNavi on Twitter! Watch LearnNavi's videos on YouTube

SMF 2.0.15 | SMF © 2017, Simple Machines
Privacy Policy
| XHTML | RSS | WAP2 | Site Rules

LearnNavi is not affiliated with the official Avatar website,
James Cameron, LightStorm Entertainment or The Walt Disney Company.
All trademarks and servicemarks are the properties of their respective owners.
Images in the LearnNavi.org Forums and Gallery may not be used without permission.

LearnNavi Affiliates:
ToS

LearnNavi is the community to learn Na'vi, the Avatar Language
"A place where real friendships are made." -Paul Frommer

AvatarMeet | Learn Na'vi Forum | Learn Na'vi Wiki | Na'viteri

LearnNavi