I'm using COPR for building couple of projects for Fedora and CentOS. Now I want to create a python script for making the release process more comfortable (create tag in git repository, updating my spec file and hopefully upload the file to the COPR). I've found python-copr library and it works fine when I want for example to get list of existing builds. However, creating a new build fails with CoprRequestException (Login invalid/expired. Please visit https://copr.fedorainfracloud.org/api to get or renew your API token.). But I guess my token is ok, because it's freshly generated and works with other endpoins.
My code is as simple as this:
from copr.v3 import BuildProxy
build_proxy = BuildProxy.create_from_config_file()
result = build_proxy.create_from_file("user", "project", "spec/file/path.spec")
Is there any solution to my problem? Thanks,