migration from third party: error when login to inCloud youtrack server

I am using the latest script (youtrack-rest-python-library from github) to import data from a third party tool (mantis). It fails from the beginning with the following error :

youtrack.YouTrackException: Error for [/user/login]: 302: Moved Temporarily

The traceback is :

Traceback (most recent call last):
File "mantis2youtrack.py", line 465, in <module>
File "mantis2youtrack.py", line 21, in main
mantis_port, mantis_login, mantis_pass, mantis_product_names)
File "mantis2youtrack.py", line 342, in mantis2youtrack
target = Connection(target_url, target_login, target_pass)
File "/home/xyz/youtrack-rest-python-library-master/python/youtrack/connection.py", line 58, in __init__
File "/home/xyz/youtrack-rest-python-library-master/python/youtrack/connection.py", line 69, in _login
raise youtrack.YouTrackException('/user/login', response, content)

The command line is the following (with some minor change for personnal entries):

python mantis2youtrack.py "https://mydomain.myjetbrains.com/", "myemail@mydomain.com", "mypasswd", dbmane, url_db, 3306, login_db, "pwd_db", myproject

So I am not able to login to my incloud youtrack instance using the script however I get a 200 response when I use postman directly.

For information this is a 2017.3 youtrack instance.

I have tried from several connection, so I am sure this is not a proxy issue.

Does someone know why I get this error and how can I solve it?


Official comment



You need to setup BaseUrl to YouTrack as mydomain.myjetbrains.com/youtrack.

I have already tried this solution and unfortunatly I get the following:

=> I get youtrack.YouTrackException: Error for [/user/login]: 404: Not Found


=> I get youtrack.YouTrackException: Error for [/user/login]: 302: Found


=> I get raise RelativeURIError("Only absolute URIs are allowed. uri = %s" % uri)
httplib2.RelativeURIError: Only absolute URIs are allowed. uri = mydomain.myjetbrains.com/youtrack,/rest/user/login?login=my_login%2C&password=my_pwd%2C




The first one is correct, but the username seems to be wrong, could you please double-check it?



I have double, triple checked my login and password and I still have the 404 error. I use the ones I enter in youtrack login page of my account.

As I have used the root account, I have tried with "root" as login, then the email @, then I have create a new admin system account and tried again with username and email.

I have the same return with postman. I have noticed in the repsonse that the error text is "You are not logged in."

I have tried to remove "" also. I have replaced "" by ' '.


Is there any configuration needed in my incloud  account ?




Could you please try to remove all commas from the request?


I just saw that a minute ago and you are right, I can now connect to youtrack server. The youtrack support isn't up to date as it mention the comma.




Anyway connection to youtrack now works fine. 

Thanks a lot for your help.


I have another trouble, but I need to dig futher on my side :)


Please sign in to leave a comment.