Q:

Pinging a static IP Address from Pi

I was pinging a device with a fixed IP Address from my raspberry pi with this code:
response = os.system("ping -c 1" + hostname)

it was working until lately(probably after upgrading the pi) I am getting: 

network unreachable

or

ip not available 

eventhough the device is there. There is no problem with the hardware and I have set a static IP address on the pi by editing /etc/dhcpcd.conf
any help ?

A:

It got resolved by resetting the pi to its default settings.

