Get filepath of the current Buffer in function

I’m building a script-runner in neovim to pipe the full path of the current buffer into a script. I’m trying to do this through a keybind with a function, but i’m having trouble to get the filepath correctly parsed in the function. I wrote this:

    function RunScript()
        let fpath = expand('%:p')
        silent !python /../../../RunScript.py $fpath
    endfunction

But the value i’m getting in the script (the fpath var basically) is a path totally unrelated to the buffer where i’m executing it (i actually have no clue where it’s coming from..).

I’m getting this:

/usr/local/share/zsh/site-functions

Any idea what could it be?

Thanks in advance!