I downloaded the DungeonSchematics folder and placed in in my filters folder. When I use the filter I get this error:
Exception during filter operation. See console for details
integer division or modulo by zero
In the console I have:
Running in fixed mode. Support files are in your Documents folder.
Splash load...
RegQuery: java.exe found at C:\Program Files\Java\jre1.8.0_77\bin\java.exe
[ WARNING][ mcplatform.py:1184]:Initializing window management...
Minecraft_Server.jar storage initialized.
Each server is stored in a subdirectory of C:\Users\cntdr\Documents\MCEdit\ServerJarStorage named with the server's version number
Cached servers: [u'Release 1.9']
C:\Users\cntdr\Games\MINECR~1\Tools\MCEdit\1F18B~1.10V\mcedit\renderer.py:1113: VisibleDeprecationWarning: boolean index did not match indexed array along dimension 0; dimension is 16 but corresponding boolean dimension is 1
DungeonSchematicRandomizer: Started at Fri Aug 05 20:57:00 2016
DUNGEON GENERATOR TYPE Underground
Found 0 start schematic files
Scanning available schematics...
Found 0 dungeon schematic files
Traceback (most recent call last):
File "editortools\filter.py", line 51, in _func
File "editortools\filter.py", line 759, in confirm
File "editortools\filter.py", line 437, in confirm
File "leveleditor.py", line 3096, in addOperation
File "leveleditor.py", line 3107, in performWithRetry
File "editortools\filter.py", line 777, in perform
File "C:\Users\cntdr\Documents\MCEdit\Filters\DungeonSchematicRandomizer_v6.py", line 200, in perform
dungeonSchematicRandomizer(level, box, options)
File "C:\Users\cntdr\Documents\MCEdit\Filters\DungeonSchematicRandomizer_v6.py", line 256, in dungeonSchematicRandomizer
chosenSchematic = randint(0,len(StartSchematicFiles)) % len(StartSchematicFiles)
ZeroDivisionError: integer division or modulo by zero
DungeonSchematicRandomizer: Started at Fri Aug 05 21:06:22 2016
DUNGEON GENERATOR TYPE Underground
Found 0 start schematic files
Scanning available schematics...
Found 0 dungeon schematic files
Traceback (most recent call last):
File "editortools\filter.py", line 51, in _func
File "editortools\filter.py", line 759, in confirm
File "editortools\filter.py", line 437, in confirm
File "leveleditor.py", line 3096, in addOperation
File "leveleditor.py", line 3107, in performWithRetry
File "editortools\filter.py", line 777, in perform
File "C:\Users\cntdr\Documents\MCEdit\Filters\DungeonSchematicRandomizer_v6.py", line 200, in perform
dungeonSchematicRandomizer(level, box, options)
File "C:\Users\cntdr\Documents\MCEdit\Filters\DungeonSchematicRandomizer_v6.py", line 256, in dungeonSchematicRandomizer
chosenSchematic = randint(0,len(StartSchematicFiles)) % len(StartSchematicFiles)
ZeroDivisionError: integer division or modulo by zero
DungeonSchematicRandomizer: Started at Fri Aug 05 21:06:34 2016
DUNGEON GENERATOR TYPE Underground
Found 0 start schematic files
Scanning available schematics...
Found 0 dungeon schematic files
Traceback (most recent call last):
File "editortools\filter.py", line 51, in _func
File "editortools\filter.py", line 759, in confirm
File "editortools\filter.py", line 437, in confirm
File "leveleditor.py", line 3096, in addOperation
File "leveleditor.py", line 3107, in performWithRetry
File "editortools\filter.py", line 777, in perform
File "C:\Users\cntdr\Documents\MCEdit\Filters\DungeonSchematicRandomizer_v6.py", line 200, in perform
dungeonSchematicRandomizer(level, box, options)
File "C:\Users\cntdr\Documents\MCEdit\Filters\DungeonSchematicRandomizer_v6.py", line 256, in dungeonSchematicRandomizer
chosenSchematic = randint(0,len(StartSchematicFiles)) % len(StartSchematicFiles)
ZeroDivisionError: integer division or modulo by zero
DungeonSchematicRandomizer: Started at Fri Aug 05 21:06:48 2016
DUNGEON GENERATOR TYPE Underground
Found 0 start schematic files
Scanning available schematics...
Found 0 dungeon schematic files
Traceback (most recent call last):
File "editortools\filter.py", line 51, in _func
File "editortools\filter.py", line 759, in confirm
File "editortools\filter.py", line 437, in confirm
File "leveleditor.py", line 3096, in addOperation
File "leveleditor.py", line 3107, in performWithRetry
File "editortools\filter.py", line 777, in perform
File "C:\Users\cntdr\Documents\MCEdit\Filters\DungeonSchematicRandomizer_v6.py", line 200, in perform
dungeonSchematicRandomizer(level, box, options)
File "C:\Users\cntdr\Documents\MCEdit\Filters\DungeonSchematicRandomizer_v6.py", line 256, in dungeonSchematicRandomizer
chosenSchematic = randint(0,len(StartSchematicFiles)) % len(StartSchematicFiles)
ZeroDivisionError: integer division or modulo by zero
DungeonSchematicRandomizer: Started at Fri Aug 05 21:12:10 2016
DUNGEON GENERATOR TYPE Underground
Found 0 start schematic files
Scanning available schematics...
Found 0 dungeon schematic files
Traceback (most recent call last):
File "editortools\filter.py", line 51, in _func
File "editortools\filter.py", line 759, in confirm
File "editortools\filter.py", line 437, in confirm
File "leveleditor.py", line 3096, in addOperation
File "leveleditor.py", line 3107, in performWithRetry
File "editortools\filter.py", line 777, in perform
File "C:\Users\cntdr\Documents\MCEdit\Filters\DungeonSchematicRandomizer_v6.py", line 200, in perform
dungeonSchematicRandomizer(level, box, options)
File "C:\Users\cntdr\Documents\MCEdit\Filters\DungeonSchematicRandomizer_v6.py", line 256, in dungeonSchematicRandomizer
chosenSchematic = randint(0,len(StartSchematicFiles)) % len(StartSchematicFiles)
ZeroDivisionError: integer division or modulo by zero
ZeroDivisionError: integer division or modulo by zero
Now I've never really worked with python but I know programming in enough languages to kind of get what they were doing. I'm assuming len() measures the length of an array. I'm assuming randint(minimum, maximum) is the correct argument notation. If that's the case then you can safely replace that line with:
This will achieve exactly what was intended by that code without the risk of dividing by zero. However it can produce an error if the length is zero and the random function isn't equipped to handle the maximum being smaller than the minimum. Really there should be a test for zero length before any of this to avoid that potential error all together.
ZeroDivisionError: integer division or modulo by zero
Now I've never really worked with python but I know programming in enough languages to kind of get what they were doing. I'm assuming len() measures the length of an array. I'm assuming randint(minimum, maximum) is the correct argument notation. If that's the case then you can safely replace that line with:
This will achieve exactly what was intended by that code without the risk of dividing by zero. However it can produce an error if the length is zero and the random function isn't equipped to handle the maximum being smaller than the minimum. Really there should be a test for zero length before any of this to avoid that potential error all together.
I tried that and I got this error:
ValueError: empty range for randrange() (0,0, 0)
I noticed that in my original error it says it found 0 start schematic file and 0 dungeon schematic files. I'm looking at this line in the .py file's code:
Hmm. One thing I would try to make sure it will work if the path is correct is to give it the absolute path (what you listed at the end). If that works then there's a pretty good chance the root path for relative path resolution isn't actually the MCEdit folder. Things I would try is to put the root path into a string and check it with a debugger or output it onto the screen somehow. You can use "./" to cause a URI to resolve to the current root path in order to query it into a string. Additionally you can use "../" to go back a folder if you find the root isn't the MCEdit folder and need to back up to that first.
Hmm. One thing I would try to make sure it will work if the path is correct is to give it the absolute path (what you listed at the end). If that works then there's a pretty good chance the root path for relative path resolution isn't actually the MCEdit folder. Things I would try is to put the root path into a string and check it with a debugger or output it onto the screen somehow. You can use "./" to cause a URI to resolve to the current root path in order to query it into a string. Additionally you can use "../" to go back a folder if you find the root isn't the MCEdit folder and need to back up to that first.
Okay, so I put the exact path for StartSchematicFiles and EncounterSchematicFiles and it worked. I'm not sure where to put the "./" or how to use it, but I tried undoing the changes I made to the to paths, then I tried coping the "filters" folder to the folder that contains the mcedit.exe and it was working, so that's the folder that the filter is trying to look into.
I also tried moving my MCEdit folder in my Documents\MCEdit folder to the desktop temporarily, then I ran MCEdit and it recreated the folder in my documents. So, I'm guessing the filter is using an outdated file path, and MCEdit looks for filters in Documents\MCEdit\Filters these days.
I guess I'll keep my changes to the filter's file path, so it looks in the correct spot.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI'm using Dungeon Schematic Randomizer (Master) found here: http://www.brightmoore.net/mcedit-filters-1/dungeonschematicrandomizerv2
I downloaded the DungeonSchematics folder and placed in in my filters folder. When I use the filter I get this error:
In the console I have:
Running in fixed mode. Support files are in your Documents folder. Splash load... RegQuery: java.exe found at C:\Program Files\Java\jre1.8.0_77\bin\java.exe [ WARNING][ mcplatform.py:1184]:Initializing window management... Minecraft_Server.jar storage initialized. Each server is stored in a subdirectory of C:\Users\cntdr\Documents\MCEdit\ServerJarStorage named with the server's version number Cached servers: [u'Release 1.9'] C:\Users\cntdr\Games\MINECR~1\Tools\MCEdit\1F18B~1.10V\mcedit\renderer.py:1113: VisibleDeprecationWarning: boolean index did not match indexed array along dimension 0; dimension is 16 but corresponding boolean dimension is 1 DungeonSchematicRandomizer: Started at Fri Aug 05 20:57:00 2016 DUNGEON GENERATOR TYPE Underground Found 0 start schematic files Scanning available schematics... Found 0 dungeon schematic files Traceback (most recent call last): File "editortools\filter.py", line 51, in _func File "editortools\filter.py", line 759, in confirm File "editortools\filter.py", line 437, in confirm File "leveleditor.py", line 3096, in addOperation File "leveleditor.py", line 3107, in performWithRetry File "editortools\filter.py", line 777, in perform File "C:\Users\cntdr\Documents\MCEdit\Filters\DungeonSchematicRandomizer_v6.py", line 200, in perform dungeonSchematicRandomizer(level, box, options) File "C:\Users\cntdr\Documents\MCEdit\Filters\DungeonSchematicRandomizer_v6.py", line 256, in dungeonSchematicRandomizer chosenSchematic = randint(0,len(StartSchematicFiles)) % len(StartSchematicFiles) ZeroDivisionError: integer division or modulo by zero DungeonSchematicRandomizer: Started at Fri Aug 05 21:06:22 2016 DUNGEON GENERATOR TYPE Underground Found 0 start schematic files Scanning available schematics... Found 0 dungeon schematic files Traceback (most recent call last): File "editortools\filter.py", line 51, in _func File "editortools\filter.py", line 759, in confirm File "editortools\filter.py", line 437, in confirm File "leveleditor.py", line 3096, in addOperation File "leveleditor.py", line 3107, in performWithRetry File "editortools\filter.py", line 777, in perform File "C:\Users\cntdr\Documents\MCEdit\Filters\DungeonSchematicRandomizer_v6.py", line 200, in perform dungeonSchematicRandomizer(level, box, options) File "C:\Users\cntdr\Documents\MCEdit\Filters\DungeonSchematicRandomizer_v6.py", line 256, in dungeonSchematicRandomizer chosenSchematic = randint(0,len(StartSchematicFiles)) % len(StartSchematicFiles) ZeroDivisionError: integer division or modulo by zero DungeonSchematicRandomizer: Started at Fri Aug 05 21:06:34 2016 DUNGEON GENERATOR TYPE Underground Found 0 start schematic files Scanning available schematics... Found 0 dungeon schematic files Traceback (most recent call last): File "editortools\filter.py", line 51, in _func File "editortools\filter.py", line 759, in confirm File "editortools\filter.py", line 437, in confirm File "leveleditor.py", line 3096, in addOperation File "leveleditor.py", line 3107, in performWithRetry File "editortools\filter.py", line 777, in perform File "C:\Users\cntdr\Documents\MCEdit\Filters\DungeonSchematicRandomizer_v6.py", line 200, in perform dungeonSchematicRandomizer(level, box, options) File "C:\Users\cntdr\Documents\MCEdit\Filters\DungeonSchematicRandomizer_v6.py", line 256, in dungeonSchematicRandomizer chosenSchematic = randint(0,len(StartSchematicFiles)) % len(StartSchematicFiles) ZeroDivisionError: integer division or modulo by zero DungeonSchematicRandomizer: Started at Fri Aug 05 21:06:48 2016 DUNGEON GENERATOR TYPE Underground Found 0 start schematic files Scanning available schematics... Found 0 dungeon schematic files Traceback (most recent call last): File "editortools\filter.py", line 51, in _func File "editortools\filter.py", line 759, in confirm File "editortools\filter.py", line 437, in confirm File "leveleditor.py", line 3096, in addOperation File "leveleditor.py", line 3107, in performWithRetry File "editortools\filter.py", line 777, in perform File "C:\Users\cntdr\Documents\MCEdit\Filters\DungeonSchematicRandomizer_v6.py", line 200, in perform dungeonSchematicRandomizer(level, box, options) File "C:\Users\cntdr\Documents\MCEdit\Filters\DungeonSchematicRandomizer_v6.py", line 256, in dungeonSchematicRandomizer chosenSchematic = randint(0,len(StartSchematicFiles)) % len(StartSchematicFiles) ZeroDivisionError: integer division or modulo by zero DungeonSchematicRandomizer: Started at Fri Aug 05 21:12:10 2016 DUNGEON GENERATOR TYPE Underground Found 0 start schematic files Scanning available schematics... Found 0 dungeon schematic files Traceback (most recent call last): File "editortools\filter.py", line 51, in _func File "editortools\filter.py", line 759, in confirm File "editortools\filter.py", line 437, in confirm File "leveleditor.py", line 3096, in addOperation File "leveleditor.py", line 3107, in performWithRetry File "editortools\filter.py", line 777, in perform File "C:\Users\cntdr\Documents\MCEdit\Filters\DungeonSchematicRandomizer_v6.py", line 200, in perform dungeonSchematicRandomizer(level, box, options) File "C:\Users\cntdr\Documents\MCEdit\Filters\DungeonSchematicRandomizer_v6.py", line 256, in dungeonSchematicRandomizer chosenSchematic = randint(0,len(StartSchematicFiles)) % len(StartSchematicFiles) ZeroDivisionError: integer division or modulo by zero-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI don't know where that would be, the only place I could think of is here, but I don't think it's it, since this isn't an issue about mcedit itself: https://github.com/mcedit/mcedit2/wiki/Reporting-Issues
The last lines of the error tell you exactly where the error is thrown from:
File "C:\Users\cntdr\Documents\MCEdit\Filters\DungeonSchematicRandomizer_v6.py", line 256, in dungeonSchematicRandomizer
The specific line of code just after it that threw the error:
chosenSchematic = randint(0,len(StartSchematicFiles)) % len(StartSchematicFiles)
And the error itself:
ZeroDivisionError: integer division or modulo by zero
Now I've never really worked with python but I know programming in enough languages to kind of get what they were doing. I'm assuming len() measures the length of an array. I'm assuming randint(minimum, maximum) is the correct argument notation. If that's the case then you can safely replace that line with:
chosenSchematic = randint(0, len(StartSchematicFiles) - 1)
This will achieve exactly what was intended by that code without the risk of dividing by zero. However it can produce an error if the length is zero and the random function isn't equipped to handle the maximum being smaller than the minimum. Really there should be a test for zero length before any of this to avoid that potential error all together.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI tried that and I got this error:
I noticed that in my original error it says it found 0 start schematic file and 0 dungeon schematic files. I'm looking at this line in the .py file's code:
StartSchematicFiles = glob.glob("filters/"+DIRPATH+"/Start/*.schematic")For the schematic set option I put: DungeonSchematics, so the file path should be
"filters/DungeonSchematics/Start/.schematic" my schematics are located here:
"C:\Users\USERNAME\Documents\MCEdit\Filters\DungeonSchematics\Start"
Hmm. One thing I would try to make sure it will work if the path is correct is to give it the absolute path (what you listed at the end). If that works then there's a pretty good chance the root path for relative path resolution isn't actually the MCEdit folder. Things I would try is to put the root path into a string and check it with a debugger or output it onto the screen somehow. You can use "./" to cause a URI to resolve to the current root path in order to query it into a string. Additionally you can use "../" to go back a folder if you find the root isn't the MCEdit folder and need to back up to that first.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumOkay, so I put the exact path for StartSchematicFiles and EncounterSchematicFiles and it worked. I'm not sure where to put the "./" or how to use it, but I tried undoing the changes I made to the to paths, then I tried coping the "filters" folder to the folder that contains the mcedit.exe and it was working, so that's the folder that the filter is trying to look into.
I also tried moving my MCEdit folder in my Documents\MCEdit folder to the desktop temporarily, then I ran MCEdit and it recreated the folder in my documents. So, I'm guessing the filter is using an outdated file path, and MCEdit looks for filters in Documents\MCEdit\Filters these days.
I guess I'll keep my changes to the filter's file path, so it looks in the correct spot.
Thanks.