Attempted relative import with no known parent package I'm new to python and attempting to split off my executes for my panels buttons into a new .py file. However, when I try to run the script I receive the following error :
init.py line 27 in 
&quot;ImportError: attempted relative import with no known parent package&quot;
the related init.py lines are :
if &quot;bpy&quot; in locals():
    import importlib
    importlib.reload(xmlhandler)
    importlib.reload(zokfunctions)
else:
    from bl_wep_export import xmlhandler 
    from bl_wep_export import zokfunctions   

    if &quot;bpy&quot; in locals():
    import importlib
    importlib.reload(xmlhandler)
    importlib.reload(zokfunctions)
else:
    from bl_wep_export import xmlhandler 
    from bl_wep_export import zokfunctions   

import bpy

from math import radians 
from .zokfunctions import execute

The zokfunctions.py file has a simple
def execute(self, context):
print(&quot;TEST&quot;)
return {'FINISHED'}

I've tried several solutions, like removing the period before zokfunctions or using a class in zokfunctions called Hello and registering it, which throws an attribute error if I remember correctly..
I do my editing in VScode and the files itself are in my blender addons folder installed as an addon, so it is addons/myaddon/the init file and zokfunctions file.
To the future me if I make more addons and to newer programmers when it comes to blender, the issue isn't actually the scripts at all. Blenders in-house text editor cannot edit multi file addons, if you try it will throw this error. I was going insane trying to figure out what was wrong with my addon and comparing it to other code.
To conclude, if you're making a multi file addon, it'll work if the syntax is right and it's installed, and you can still edit it this way..