NMLC Error: File Exists Already

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
PNDA
Engineer
Engineer
Posts: 12
Joined: 14 Mar 2018 15:05
Location: Germany

NMLC Error: File Exists Already

Post by PNDA »

Hello,

i have been using NMLC to create NewGRF's and everything worked fine. Yesterday i tried to recompile the .nml after making some slight changes into it and since then i am getting this error:

Code: Select all

nmlc-version: v6379:afad0c76c40b from 2017-06-19
Error:    (FileExistsError) "[WinError 183] Eine Datei kann nicht erstellt werden, wenn sie bereits vorhanden ist (mode 555 != expected mode 777): 'D:\\grfs\\RheinMainPack\\gfx'".
Command:  ['nmlc', '-c', '--grf', 'RheinMainPack.grf', 'D:\\grfs\\RheinMainPack\\allgrf.nml', '--lang-dir=D:\\grfs\\RheinMainPack\\lang', '--output=D:\\grfs\\finished\\RheinMainPack\\RheinMainPack.grf']
Location: File "c:\python\32-bit\3.3\lib\os.py", line 269, in makedirs
Couldn't find a solution in the internet.
Also, where do I post finished NewGRF's?
Last edited by PNDA on 26 Mar 2018 13:14, edited 1 time in total.
Image
User avatar
acs121
Tycoon
Tycoon
Posts: 1956
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: NMLC Error: File Exists Already

Post by acs121 »

Finished GRFs are in "Graphics Releases".
Kruemelchen
Transport Coordinator
Transport Coordinator
Posts: 287
Joined: 18 Feb 2017 17:47

Re: NMLC Error: File Exists Already

Post by Kruemelchen »

You might got the error because the .grf file can't be overwritten by nmlc. You should be able to recompile it after moving / deleting / renaming it, since that way nmlc can write a new file.

You wrote, however, that you made changes to the .grf file? I hope you are aware, that any changes to the .grf file will be lost, once you recompiled it from the nml source.
PNDA
Engineer
Engineer
Posts: 12
Joined: 14 Mar 2018 15:05
Location: Germany

Re: NMLC Error: File Exists Already

Post by PNDA »

Kruemelchen wrote: You might got the error because the .grf file can't be overwritten by nmlc. You should be able to recompile it after moving / deleting / renaming it, since that way nmlc can write a new file.

You wrote, however, that you made changes to the .grf file? I hope you are aware, that any changes to the .grf file will be lost, once you recompiled it from the nml source.
1. I move the .grf files into folders so i can keep track of all my versions, and there is no .grf file in that location. Also it is possible that NMLC overwritts a .grf file.
2. I mean i changed the .nml file.
3. The Directory where the file apparently cant be written to, is my \gfx folder for the .grf

acs121 wrote: Finished GRFs are in "Graphics Releases".
Thanks
Image
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: NMLC Error: File Exists Already

Post by Alberth »

If "mode 555" is anything like a Unix mode, it means it can't write something (where write to a directory means file creation). Besides the output file, it also writes/updates a cache file for the graphics, maybe it's troubled by that.
Being a retired OpenTTD developer does not mean I know what I am doing.
PNDA
Engineer
Engineer
Posts: 12
Joined: 14 Mar 2018 15:05
Location: Germany

Re: NMLC Error: File Exists Already

Post by PNDA »

Alberth wrote: If "mode 555" is anything like a Unix mode, it means it can't write something (where write to a directory means file creation).
As far as i know Unix is a part of Linux which i dont use

Alberth wrote: Besides the output file, it also writes/updates a cache file for the graphics, maybe it's troubled by that.
I got the error and it created the .cache and .cacheindex files. I thought that was the problem so i deleted the cache files and redid the command. same error and no cache files are being created


And I have just managed to fix the error by creating a new folder, seems to have been some windows folder error..
Image
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: NMLC Error: File Exists Already

Post by Alberth »

PandaCode wrote:
Alberth wrote: If "mode 555" is anything like a Unix mode, it means it can't write something (where write to a directory means file creation).
As far as i know Unix is a part of Linux which i dont use
Actually, it's the other way around, Linux is one form of Unix, but there are many more.

Aside from that, different operating systems borrow a lot of concepts from each other, so under the hood, a lot of stuff is very similar (most systems understand hard-disks, and have nested directories with files, that have read and write access, for example).

In addition, if a programmer has to write a Python interface for file system access rights for all supported platform, he likely picks a model that he knows, and uses that throughout the module, until at the bottom, he calls the correct operating system function to deal with the platform specifics.
Being a retired OpenTTD developer does not mean I know what I am doing.
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: NMLC Error: File Exists Already

Post by Eddi »

the message does seem a bit cryptic, but i think it's trying to say you don't have enough permissions in the directory 'D:\\grfs\\RheinMainPack\\gfx' to create new files. However i don't know enough about windows permissions to give you a solution
User avatar
Leanden
Tycoon
Tycoon
Posts: 2613
Joined: 19 Mar 2009 19:25
Location: Kent

Re: NMLC Error: File Exists Already

Post by Leanden »

Silly question but did you escalate the command prompt (as in run as administratir)?
Image
PNDA
Engineer
Engineer
Posts: 12
Joined: 14 Mar 2018 15:05
Location: Germany

Re: NMLC Error: File Exists Already

Post by PNDA »

Eddi wrote: the message does seem a bit cryptic, but i think it's trying to say you don't have enough permissions in the directory 'D:\\grfs\\RheinMainPack\\gfx' to create new files. However i don't know enough about windows permissions to give you a solution
I should have the Permissions, because my account is the only account on my PC. Also it worked before. But as I replaced the folder, it worked, maybe it had to do something with permissions or something. The folder seems to have been corrupt.
Leanden wrote: Silly question but did you escalate the command prompt (as in run as administratir)?
yes I did, but it didnt change anything :/


Anyways i fixed the Problem with replacing the "gfx" folder!
Image
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 13 guests