Having trouble with wmlint

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
cephalo
Posts: 137
Joined: December 20th, 2009, 4:37 pm

Having trouble with wmlint

Post by cephalo »

I'm trying to follow the wiki and not having any luck running wmlint. I am using the steam version(windows) of wesnoth.

Here is the batch file I'm trying to use:

Code: Select all

C:\Users\Rich\AppData\Local\Programs\Python\Python36-32\python.exe "C:\Program Files (x86)\Steam\steamapps\common\wesnoth\data\tools\wmllint" --dryrun "C:\Program Files (x86)\Steam\steamapps\common\wesnoth\data\core" "C:\Users\Rich\Documents\My Games\Wesnoth1.14\data\add-ons\Library_Of_Kratemaqht" 1>wmllint.log 2>wmllint-err.log
pause
The wmllint-err log reports this:

Code: Select all

wmllint: internal error on C:\Program Files (x86)\Steam\steamapps\common\wesnoth\data\core\macros\names.cfg
Traceback (most recent call last):
  File "C:\Program Files (x86)\Steam\steamapps\common\wesnoth\data\tools\wmllint", line 3215, in <module>
    changed = translator(fn, [maptransform], texttransform)
  File "C:\Program Files (x86)\Steam\steamapps\common\wesnoth\data\tools\wmllint", line 2638, in translator
    newline = textxform(filename, lineno, line)
  File "C:\Program Files (x86)\Steam\steamapps\common\wesnoth\data\tools\wmllint", line 3077, in texttransform
    print(msg)
  File "C:\Users\Rich\AppData\Local\Programs\Python\Python36-32\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u02bf' in position 129: character maps to <undefined>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files (x86)\Steam\steamapps\common\wesnoth\data\tools\wmllint", line 3233, in <module>
    raise exc_type(exc_value).with_traceback(exc_traceback)
TypeError: function takes exactly 5 arguments (1 given)
Playtesting has shown some missing images and strange behaviors from 1.12, hoping to get an assist from wmllint. Let me know if you see a mistake.
User avatar
Ravana
Forum Moderator
Posts: 3002
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Having trouble with wmlint

Post by Ravana »

Nowadays there is GUI for wml tools, viewtopic.php?f=10&t=40397.

Error message suggests problem with file encoding.
cephalo
Posts: 137
Joined: December 20th, 2009, 4:37 pm

Re: Having trouble with wmlint

Post by cephalo »

Wow that's great. I love it.
User avatar
Eagle_11
Posts: 759
Joined: November 20th, 2013, 12:20 pm

Re: Having trouble with wmlint

Post by Eagle_11 »

How did i not know about that GUI yet, thats amazing! :o
Post Reply