Page 2 of 4

Re: Introducing: musa. The new BaNaNaS upload tool

Posted: 20 Sep 2013 14:17
by Zuu
Could you provide all input data that you have used. Including the config file.

With that, someone could try to reproduce your error with little effort and not by mistake doing something different from what you did.

Re: Introducing: musa. The new BaNaNaS upload tool

Posted: 22 Sep 2013 16:04
by juzza1
grf: http://bundles.openttdcoop.org/finnisht ... .7.tar.zip

Config file: https://dev.openttdcoop.org/attachments ... ts_057.ini

Musa: newest version, fresh checkout using TortoiseSVN

Command used to run musa.py

Code: Select all

python musa.py -c fts_057.ini -d -u juzza1 -p XXX finnishtrainset.grf

Re: Introducing: musa. The new BaNaNaS upload tool

Posted: 22 Sep 2013 22:23
by Zuu
This patch does seem to fix the issue.

For some reason the result value from get_grfid() is not an int on Windows. Later the data type is verified to be an int. Which fails and you get the error that you have reported. The attached patch force the result of get_grfid() to be an integer. It may however cast away error states as well. So a proper fix may need to check if the value is null before casting to int.

Re: Introducing: musa. The new BaNaNaS upload tool

Posted: 23 Sep 2013 00:30
by juzza1
Thanks for the patch, I am now able to package the grf. Dry run works ok. However, attempting to upload the grf gave me these errors:

Code: Select all

are you one of the authors of this content, if so answer 'yes I am': yes I am

Traceback (most recent call last):
  File "C:\TTDp\musa\musa.py", line 183, in <module>
    main()
  File "C:\TTDp\musa\musa.py", line 167, in main
    send_file(sock, tar_file)
  File "C:\TTDp\musa\musa.py", line 137, in send_file
    send_data(sock, data, True)
  File "C:\TTDp\musa\musa.py", line 120, in send_data
    sock.send(data)
  File "C:\Python27\lib\ssl.py", line 198, in send
    v = self._sslobj.write(data)
socket.error: [Errno 10054] An existing connection was forcibly closed by the re
mote host
Input files are the same as previously, plus changelog.txt, readme.txt and readme_fi.txt. Cmd was run as administrator. I don't have any external firewalls or routers blocking my connection.

Re: Introducing: musa. The new BaNaNaS upload tool

Posted: 09 Dec 2013 01:31
by Andrew350
Maybe this was answered elsewhere, but was there a solution found to the problem in the post above? I am getting the exact same error, and have no idea what it means. :)

Re: Introducing: musa. The new BaNaNaS upload tool

Posted: 10 Dec 2013 19:30
by juzza1
Just tried to upload the newest Finnish Trainset, getting the same as above except for the actual error:

Code: Select all

socket.error: [Errno 32] Broken pipe
Dry run works ok. If the devs need any help with grunt work/testing/whatever I might be able to help with, let me know.

Re: Introducing: musa. The new BaNaNaS upload tool

Posted: 10 Dec 2013 21:57
by Rubidium
juzza1's upload worked and the one I made, maybe others work as well. Looks like the code at the server wasn't updated, so it was still running some old version. Furthermore it seems to lose its connection with the database, so now it creates a new one for each upload instead of keeping a single connection.

Re: Introducing: musa. The new BaNaNaS upload tool

Posted: 25 May 2014 14:36
by JRD
I can not update the GRF.

Code: Select all

C:\Python27\musa>C:\Python27\python C:\Python27\musa\musa.py -c C:\Python27\musa
\jrdtrain.ini -d -u JRD -p xxx D:\nmlcodec\Projekty\JRD_SET\JRD_EURO_trai
n_set.grf
packaging files... (might take a while)
are you one of the authors of this content, if so answer 'yes I am': yes I am
error: dependency NewGRF:4A520101:e8e8d036b568ee1d7b86aff276cac42c not in banana
s
an error occurred and the content is not uploaded
or:

Code: Select all

packaging files... (might take a while)
are you one of the authors of this content, if so answer 'yes I am': yes I am
metadata validated at server side
not uploading tarball due to dry run
Can you advise ?

Re: Introducing: musa. The new BaNaNaS upload tool

Posted: 25 May 2014 14:54
by Zuu
The first error is that you've declared a dependency that appears to not exist in bananas. Which NewGRF is it that you try to declare as dependency?

The second error is probably because you supplied an argument to only make a dry run.

Re: Introducing: musa. The new BaNaNaS upload tool

Posted: 25 May 2014 15:06
by JRD
OK thank you.

Re: Introducing: musa. The new BaNaNaS upload tool

Posted: 25 Jul 2014 16:27
by juzza1
A typo in the help text:
musa.py --help wrote:

Code: Select all

Usage: musa.py -c <config> [-dhqv] [-x <regexp>] [-u username] [-p password] <files>

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -r, --recursive       search for files recursively
  -v, --verbose         print extra debug information
  -c FILE, --config=FILE
                        the configuration file
  -x EXCLUDE, --exclude=EXCLUDE
                        regular expressions of files to not include
  -d, --dryrun          perform a dry run where all tests, including remote
                        tests, are performed but the content is not uploaded
                        into the content system
  -u USERNAME, --username=USERNAME
                        the username for uploading content
  -p PASSWORD, --password=PASSWORD
                        the password for uploading content
-q is mentioned in the usage line, but it is not available in the source. -r is not mentioned in the usage line, but is available in the source.

Re: Introducing: musa. The new BaNaNaS upload tool

Posted: 25 Jul 2014 16:53
by keoz
Additional note: about uploading a Game Script with musa

I struggled a little bit on that question, thus I add here some info. In order to upload an entire Game Script, you need to give, as target, all the necessary files which are needed by the script.

Thus, the command will look something like:

Code: Select all

/path/to/musa.py -c config-file.ini -u user -p password *.nut readme.txt
Note that you don't need to include your own license text, because a complete license is already included in musa, for all supported license's types. You even should avoid including your own license.txt. In my case, musa complained about it.

(And thanks juzza1 for the help.)

Re: Introducing: musa. The new BaNaNaS upload tool

Posted: 26 Jul 2014 06:16
by Zuu
keoz wrote:Thus, the command will look something like:

Code: Select all

/path/to/musa.py -c config-file.ini -u user -p password *.nut readme.txt
Don't forget lang/*.txt too.

You may be interested in upload.sh from Beginner Tutorial

Re: Introducing: musa. The new BaNaNaS upload tool

Posted: 28 Aug 2014 14:15
by keoz
Ok, I did a mistake.

To include a file in /lang, I launched musa giving as parameter /lang instead of /lang/*.txt (thinking that musa would either include the file automatically, either complain), which resulted in an incomplete upload :/

Any chance that someone could remove the just uploaded last version (3) of Renewed City Growth GS ? If possible, I'd like to avoid incrementing the version number just for a missing file.

Edit: Ok, it's fine. I could manage to solve the issue by updating bananas with a minor version number and making a fake change in the code.

I'd like to suggest some improvements to musa:
- As it already is true for AI's or NewGRF's, it'd be worth allowing to give a simple .tar to musa as input GS.
- alternatively, add a message about /lang being not a valid objet or search automatically in /lang for text files.

If I find time, I'll try myself to build and propose some little patch for that. Will be the good occasion to learn python again.

Re: Introducing: musa. The new BaNaNaS upload tool

Posted: 04 Jan 2015 19:30
by frosch
musa (and depgen) is now also available as a windows executable from
http://bundles.openttdcoop.org/musa/push/LATEST/

If execution fails due to missing MSVCR libraries or due to an invalid application configuration or similar error, you need to install
http://www.microsoft.com/en-us/download ... aspx?id=29

If you have trouble with creating the ini file for musa, some projects started to include the musa configuration file into the source repository, so you can have a look there:(Including the configuration file into the source repository makes it very easy to update the bananas entry without having to look up the meta data every time)

Re: Introducing: musa. The new BaNaNaS upload tool

Posted: 04 Jan 2015 20:30
by Transportman
I will try it the next time I upload something to BaNaNaS, looks interesting.

Other question, is it with musa possible to directly upload releases from the DevZone to BaNaNaS?

Re: Introducing: musa. The new BaNaNaS upload tool

Posted: 04 Jan 2015 22:03
by frosch
Transportman wrote:Other question, is it with musa possible to directly upload releases from the DevZone to BaNaNaS?
In theory yes, but there are many questions to answer before that can be done: https://dev.openttdcoop.org/issues/6824

Re: Introducing: musa. The new BaNaNaS upload tool

Posted: 19 Oct 2018 20:16
by SimYouLater
This topic should be pinned, since as of this writing TrueBrain has pointed out that this is the only currently-supported upload method for BaNaNaS.

Already done, didn't notice. Sorry!

Re: Introducing: musa. The new BaNaNaS upload tool

Posted: 21 Oct 2018 06:15
by NekoMaster
I'm having an issue with trying to upload a 4096x4096 size scenario, MUSA seems to think theres something wrong with the file even though I've tried using a very fresh save that works just fine in game when loading through the Play Scenario menu.

I have no idea how to fix this and I really hope this isn't due to some limitation with MUSA's code as that would be a very bad thing for the few people that might want to upload 4K size scenarios like me.

Heres the output of my command line when I try to upload the file

Code: Select all

musa.exe -u nek0master -p NotGoingToPostMyPasswordHere:) -v -c USA4KECS.SCN
reading configuration file USA4KECS.SCN...
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\cx_Freeze\initscripts\Console.py", line 27, in <module>
  File "musa.py", line 183, in <module>
  File "musa.py", line 50, in main
  File "C:\Python27\lib\ConfigParser.py", line 297, in read
  File "C:\Python27\lib\ConfigParser.py", line 504, in _read
ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: USA4KECS.SCN, line: 1
'OTTX\x00\xc4\x00\x00\xfd7zXZ\x00\x00\x01i"\xde6\x02\x00!\x01\x12\x00\x00\x00#\xb8\x87,\xecX\xfb\xf0\x00]\x00#\x93\x06!\x06\x93\x93\x0c5i;T\x02$U\xcc{\xfd7\xc9\x83\x0f\xba\xf0_\xb4\x04\x82\xfe!\xd3\x0b\xd4\xdc\xb6\xb1d\x8d\x17\xcf\x07\\2H\x19\xdb\xf4Z\xc1'

D:\Users\Matthew\Documents\OpenTTD\scenario>pause
Press any key to continue . . .
This is my INI file

Code: Select all

[musa]
type = scenario
# The name for the content; at most 32 characters.
name = 	USA-Canada 4K ECS Vectors

# The version of the content; at most 16 characters.
version = 2.0.1

# Description for the content; at most 512 characters.
# If the description_file key exists, then that file is read. Otherwise
# description_text is used. Please not that with description_text it is
# not possible to have newlines in the description.
#description_text = 
description_file = USA-CANADA_4K_ECS_TEXT.TXT


# URL to get to the home page of the content.
url = https://www.tt-forums.net/memberlist.php?mode=viewprofile&u=24531
license = GPL v2

# A comma separated list of tags for the content. Each tag may be at most 32
# characters long.
tags = nekomaster, neko, master, nek0, neko-master, north, america, american, usa, canada, mexico, atlantic, pacific, rockies, united states, nars, ecs, vectors, industries, amtrak, youtube_is_down_2018

# It is preferred to use the nightly revision as that allows your content to
# be visible by the betas and release candidates of the stable release as well.
# openttd_minimum_supported_version = 1.2 r23456
openttd_minimum_supported_version = 1.7.2
openttd_maximum_supported_version = 

# openttd_maximum_supported_version = 1.3.0
# A comma separated list of objects this content depends on.
dependencies =

# The case sensitive comma separated list of usernames of the authors that may
# update this content in the content system. The uploading author must be one of
# these specified authors.
authors = nek0master

Re: Introducing: musa. The new BaNaNaS upload tool

Posted: 21 Oct 2018 22:32
by Wahazar
Where I can find musa for *ix? http://hg.openttd.org/openttd/extra/musa.hg leads me to openttd-master...