Can't make this addon work

Hello, I am a fairly unexperienced user in Phyton, I am trying to create a 3D model from an .hgt file and after hours of searching I came accross a Blender addon, and it looked like that was what I was looking for. But unfortunately, I wasn’t able to activate the addon due to some error, and I don’t have the knowledge to understand it.

This is the error I am getting;

Imgur

… and this is the last piece of the code. I put !!! on the line that causes the error.

# Only needed if you want to add into a dynamic menu
def menu_func_import(self, context):
    self.layout.operator(ImportTerrain.bl_idname, text="Terrain (.hgt)")

def register():
    bpy.utils.register_class(ImportTerrain)
    if _isBlender280:
        bpy.types.TOPBAR_MT_file_import.append(menu_func_import)
    else:
        bpy.types.INFO_MT_file_import.append(menu_func_import) !!!!

def unregister():
    bpy.utils.unregister_class(ImportTerrain)
    if _isBlender280:
        bpy.types.TOPBAR_MT_file_import.remove(menu_func_import)
    else:
        bpy.types.INFO_MT_file_import.remove(menu_func_import)

I apologise if the topic is formatted badly.

Welcome to BA :smiley:

The Blender Terrain add-on is out of date and no longer maintained. It only works up to 2.80, so you’re not going to have much luck with it. That being said, the terrain import functionality you need has been ported over to this add-on:

Which has been updated for more recent versions of Blender. I’d recommend using that instead :slight_smile: