Comments (10)
This was compiled from git, no packages involved. I can't say for sure, but I seem to remember that the tools don't come with package versions.
from wesnoth.
from wesnoth.
SyntaxWarning: invalid escape sequence '\*'
indicates issues in file.
from wesnoth.
There is no file in this case, but at least wmlindent is running as compared to the first case when it aborts due to missing module.
from wesnoth.
Since the Python tools appear to run correctly in previous versions, it could be related to the new Python version (I haven't updated yet so I can't tell for sure).
The SyntaxWarning: invalid escape sequence '\*'
line certainly is specific to Python 3.12, and this is something that we'll have to fix because it's planned that a future Python version will convert that warning into a much harsher SyntaxError
.
from wesnoth.
Since the Python tools appear to run correctly in previous versions, it could be related to the new Python version (I haven't updated yet so I can't tell for sure).
This isn't new. I'm not positive it goes back to 1.16, but I'm over 50/50. Or if you mean python version I didn't pay attention, but the issue goes back a couple years at least.
The
SyntaxWarning: invalid escape sequence '\*'
line certainly is specific to Python 3.12, and this is something that we'll have to fix because it's planned that a future Python version will convert that warning into a much harsherSyntaxError
.
Oh, that's a different issue I guess. I thought that was just because I ran it without any input, but I just ran it on /usr/local/share/wesnoth/data/campaigns/Secrets_of_the_Ancients/scenarios/11_Battleground.cfg.out and it does error. I was only trying to show that /usr/local/bin/wml* and /usr/local/share/wesnoth/data/tools/wml* worked differently.
Perhaps I just stumbled on this since I was working on u24.04 (python=3.12.3)? I haven't seen an issue with python=3.10.12 on an earlier 1.19 build.
from wesnoth.
I tried to test this with cmake, but I can't find any way to build the WML tools other than scons. Perhaps that's documented along with the WML tools build instructions for scons.
On a different note, I did try setting, for example export PYTHONPATH=/usr/local/lib/python/site-packages and I still got an error, but a different one. I'm wondering if no one notices /usr/local/bin/wmlindent not working (for them) because they have their environment set correctly, whereas I am working from a clean slate. If so, I think it's reasonable for the user to expect at least some directions on what to set up (though just doing something like installing links in $prefix/bin to $prefix/share/wesnoth/data/tools/ seems like a better approach since that just works without the user having to do anything -- unless perhaps there's a reason to respect their environment?).
from wesnoth.
I've added the Linux label since this is clearly dependent on Linux's practice of distributing an installed program and its associated files across various places.
I'd say the easiest fix is to just install a shell script that changes to the appropriate directory and runs the tool from there. There might be a better fix though.
But I am wondering if this is specifically a Wesnoth issue at all. Unless you installed the Flatpak version, this is probably something to raise with the Ubuntu package managers rather than with Wesnoth.
EDIT: Ah, it could still be a bug in scons install-pytools
, which would indeed be on us.
from wesnoth.
Still specific to Linux in any case.
from wesnoth.
Running tools installed fails because it can't find the "wesnoth" module. The build script seems to be installing that module to site-packages, so this could be probably fixed by setting it to correct value for your environment. There's python_site_packages_dir
setting in scons script for that. I'm not sure how python is looking for site packages now. I bet it changed a lot. You can still launch them from data/tools directly and it will find "wesnoth" module then because it's in same dir as the tool in question. Probably with python it's expected to use setuptools/poetry/etc to do proper system installs.
from wesnoth.
Related Issues (20)
- Update time-line with recent (April 2024) changes to lore dates HOT 2
- EI - 10. Dark Sanctuary - Owaec can go into the sanctuary HOT 3
- Assertion needs_download.size() failed when observing game
- In-game chat doesn't redraw over water when help is open HOT 2
- Should have a better error message when `[unit]type=` in ActionWML names an unknown type HOT 1
- Close button scrunched in some help menus HOT 3
- hide_help=yes in [unit_type] hides help halfway HOT 2
- EI: In S14 Drowned Plains Replays, Hahid Dialogue Breaks Replays HOT 5
- Delay shroud updates breaks second_unit references for sighted events HOT 4
- Achievements Can Be Earned When Watching Replays
- Move image copyrights to image HOT 7
- wmlxgettext is not compatible with python 3.12 HOT 6
- wmllint cannot handle # inside single-line Lua code HOT 2
- gui.show_dialog takes 13 px more space than it should on each side HOT 4
- apply_to=status add=unplagueable => status=not_living HOT 2
- Remove confusion about SP and MP saves of hybrid campaigns having the same names HOT 5
- Allow admins to remove add-ons from the in-game UI HOT 1
- After sorting by level in the recall window recall or cancel leads to a crash HOT 1
- Prestart messages not being cleared HOT 1
- :droid should either do something or error when given a null/empty side
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wesnoth.