Unreal module has no attribute EditorLevelLibrary

Keep getting this error, even though the same code worked yesterday and I haven’t changed it.

currentLevel = unreal.EditorLevelLibrary.get_editor_world()

LogPython: Error: AttributeError: ‘module’ object has no attribute ‘EditorLevelLibrary’

Python Automation Test = enabled (what is this, anyway?)
Python Editor Script Plugin = enabled
Sequencer Scripting = enabled

I greatly appreciate that editor scripting has been exposed to python, but you guys sure aren’t making it easy.

2 Likes

Is the Editor Scripting Utilities plug-in enabled?

3 Likes

Update: It appears to work on some projects and not others. (all 4.24 with same plugins loaded)

Yeah, I guess i didn’t catch that Python Editor Script Plugin is not the same as Editor Scripting Utilities.
I did a search in the plugin window for “py…” and the Editor Scripting Utilities was not in the results.
I found it and enabled it and it looks like that was the answer.
Thanks.

4 Likes

For UE 4.27 same solution, enable the plugin

1 Like