Python Script FBX export blender problem

I am writing a simple script that will export a file in blender

CODE

import bpy

bpy.ops.object.select_by_type(type='MESH')
bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY')
bpy.ops.export_scene.fbx(filepath="~/Desktop/updatedhouse.fbx", path_mode='RELATIVE')


I am running into the following error and I am not sure how to decipher it.

 line 291, in write
with open(fn, 'wb') as f:
FileNotFoundError: [Errno 2] No such file or directory: '~/Desktop/updatedhouse.fbx'

location: /private/var/folders/48/ptx7wqz138x4_shgs5nk6szm0000gn/T/AppTranslocation/DEB386B3-C3FC-4FAB-B7A2-0954C07B91CF/d/blender.app/Contents/MacOS/../Resources/2.78/scripts/modules/bpy/ops.py:189

• That doesn't look like a valid relative path address. And if it is it probably means the folder you are trying to export to doesn't exist yet – Duarte Farrajota Ramos Jun 14 '17 at 23:56
• ~/Desktop? is the defualt desktop path for a Mac. How could it not be valid? – luii Jun 15 '17 at 0:00
• Nevermind you were right. I needed to specify the entire path – luii Jun 15 '17 at 0:02

I needed to specify my entire file path in the filepath parameter of the bpy.ops.export_scene.fbx method.
bpy.ops.export_scene.fbx(filepath = yourpath, use_selection = True)