Mastodon Instance OS Requirement

Is mastodon only support ubuntu 16.04 and above? Because when I try to run below code in ubuntu:14.04 then I got "Error:“MastodonNetworkError: Could not complete request: hostname ‘mastodon.social’ doesn’t match ‘app01.fr1.maas.network” but when I run same code in ubuntu:16.04 then it doesn’t give me any error and works fine. Is mastodon has anything to do with my OS version??

Code:::

from mastodon import Mastodon
Mastodon.create_app(
‘ooterapp’,
api_base_url = ‘https://mastodon.social’,
to_file = ‘client.secret’
)

mastodon = Mastodon(
client_id = ‘client.secret’,
api_base_url = ‘https://mastodon.social
)
mastodon.log_in(
‘abc@gmail.com’,
‘abc’,
to_file = ‘user.secret’
)

mastodon = Mastodon(
client_id = ‘client.secret’,
access_token = ‘user.secret’,
api_base_url = ‘https://mastodon.social
)
mastodon.toot(‘Tooting from python using #mastodonpy !’)

A post was merged into an existing topic: Mastodon Network Error inside docker container