Closed astrooom closed 3 years ago
Can you provide an example of what you're trying to do?
I am simply trying to create a server through pydactyl using the Environment option. For example, running this command:
client.servers.create_server(name='Pydactyl test', user_id=1, nest_id=8, egg_id=76, memory_limit=0, swap_limit=0, backup_limit=0, disk_limit=0, location_ids=[1], environment={"WORLD_NAME": "myworld"})
Where the egg is tModLoader for Terraria with the WORLD_NAME variable being the name for the world, results in:
env_with_defaults[var_name] = var['attributes'].get( TypeError: 'str' object does not support item assignment
I've tried inputting all the environment variables for the egg in to the dictionary, as well as trying different ones, but I get the same error message.
The Minecraft Vanilla egg returns the long exception report above. There may be more eggs that return the same type of error as well, that I haven't tried.
Yep, I can confirm I am having the same issue with all of my eggs.
I think there was an issue in 0.1.13 from some refactoring that was done for pagination. If you use 0.1.12 it should work.
I'll take a look and try to get that fixed.
0.1.12 doesn't work either because the backup_limit option has to be present.
EDIT: Was able to fix the backup_limit option manually using hwalkers pull request, but the
env_with_defaults[var_name] = var['attributes'].get( TypeError: 'str' object does not support item assignment
is still present when using environment
0.1.12 doesn't work either because the backup_limit option has to be present.
EDIT: Was able to fix the backup_limit option manually using hwalkers pull request, but the
env_with_defaults[var_name] = var['attributes'].get( TypeError: 'str' object does not support item assignment
is still present when using environment
The PR is now in master, just needs to be on PyPI.
PR for the environment- or for the backup_limit fix?
PR for the environment- or for the backup_limit fix?
For the backup_limit
Not sure why you closed it as the issue is still there :D. 0.1.12 didn't fix the environment variable.
You can see the commit that closed the issue. It's fixed in 0.1.14.
I see, that's my bad. Thank you!
Latest Panel and Wings versions
The environment variables when creating/modifying servers through pydactyl either throws the exception:
where 'int' is replaced by which type of data you give the variable (if i wrote "latest" it would be "str" etc).
or for some eggs, such as vanilla Minecraft - the exception: