FBX export operator - How can I change the scaling mode?
oh sorry for this stupid question
as Robert Gützkow and brockmann mentioned I didn't set the path
import bpy

#example path to store files
path = os.path.expanduser(&quot;~/Desktop&quot;)

#export fbx
filename = path + 'Test.fbx'
bpy.ops.export_scene.fbx(filepath=filename, use_selection=True,apply_scale_options='FBX_SCALE_UNITS',apply_unit_scale=True)


os.path.join() method in Python join one or more path components
intelligently. This method concatenates various path components with
exactly one directory separator (‘/’) following each non-empty part
except the last path component. If the last path component to be
joined is empty then a directory seperator (‘/’) is put at the end.

import bpy

# importing os module  
import os 
  
    
#example path to store files
path = os.path.expanduser(&quot;~/Desktop&quot;)

# Join various path components  
filename = os.path.join(path, 'Test.fbx')
    
bpy.ops.export_scene.fbx(filepath=filename, use_selection=True,apply_scale_options='FBX_SCALE_UNITS',apply_unit_scale=True)

Instead of setting path manually, I use this solution