Piano hat not woking HELP! [SOLVED]

when i navigate to the piano hat file and type in sudo python simple-piano.py it says this for all files.
Traceback (most recent call last):
File “simple-piano.py”, line 3, in
import pianohat
File “/usr/local/lib/python2.7/dist-packages/pianohat.py”, line 103, in
_piano_ctog = cap1xxx.Cap1188(i2c_addr=0x28, alert_pin=4)
File “/usr/local/lib/python2.7/dist-packages/cap1xxx.py”, line 242, in init
self.i2c = SMBus(i2c_bus)
IOError: [Errno 2] No such file or directory
Exception AttributeError: “Cap1188 instance has no attribute ‘alert_pin’” in <bound method Cap1188.del of <cap1xxx.Cap1188 instance at 0x76a30e68>> ignored

i have no idea what this means

HELP

Did you install using our one-liner, and did you reboot your Pi afterwards?

I have now rebooted and yes i used one liner now it says a similar thing ending in

IOError: [Errno 5] Input/output error

Thanks for your swift reply

how are you connecting the HAT to the Pi, directly on top of the GPIO?

I am connecting the hat directly onto the gpio pins so it lies over the board

Have now reconnected hat and it works fine now thanks for the help