github2youtrack XML parsing error

I try to import GitHub Issues to YouTrack as described here: https://www.jetbrains.com/help/youtrack/incloud/import-from-github.html,

but get a Python error:

```root@1fee2b9a94cb:/usr/src/app# github2youtrack -t perm:__YOUTRACK_TOKEN__ https://iqb.myjetbrains.com _GH_USER_ _GH_password_ iqb-berlin/testcenter-iqb-php
Traceback (most recent call last):
File "/usr/local/bin/github2youtrack", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/site-packages/youtrackutils/github2youtrack.py", line 131, in main
csv2youtrack.csv2youtrack(params)
File "/usr/local/lib/python2.7/site-packages/youtrackutils/csv2youtrack.py", line 245, in csv2youtrack
importer.import_csv()
File "/usr/local/lib/python2.7/site-packages/youtrackutils/csv2youtrack.py", line 275, in import_csv
self.do_import(projects, new_projects_owner_login)
File "/usr/local/lib/python2.7/site-packages/youtrack/youtrackImporter.py", line 25, in do_import
self._create_custom_fields(project_ids)
File "/usr/local/lib/python2.7/site-packages/youtrack/youtrackImporter.py", line 48, in _create_custom_fields
self._create_field(yt_field[NAME], yt_field[TYPE], yt_field.get(POLICY), yt_field[AUTO_ATTACHED])
File "/usr/local/lib/python2.7/site-packages/youtrack/youtrackImporter.py", line 42, in _create_field
create_custom_field(self._target, field_type, field_name, auto_attached, bundle_policy=attach_bundle_policy)
File "/usr/local/lib/python2.7/site-packages/youtrack/importHelper.py", line 50, in create_custom_field
field = _get_custom_field(connection, cf_name)
File "/usr/local/lib/python2.7/site-packages/youtrack/importHelper.py", line 22, in _get_custom_field
existing_fields = [item for item in connection.getCustomFields() if utf8encode(item.name).lower() ==
File "/usr/local/lib/python2.7/site-packages/youtrack/connection.py", line 855, in getCustomFields
xml = minidom.parseString(content)
File "/usr/local/lib/python2.7/xml/dom/minidom.py", line 1928, in parseString
return expatbuilder.parseString(string)
File "/usr/local/lib/python2.7/xml/dom/expatbuilder.py", line 940, in parseString
return builder.parseString(string)
File "/usr/local/lib/python2.7/xml/dom/expatbuilder.py", line 223, in parseString
parser.Parse(string, True)
xml.parsers.expat.ExpatError: syntax error: line 1, column 0

```

I also tried with YT-username and password but get the very same error.

I have a root-user in YT.

Any suggestions?

 

 

 

 

My Python-Environment (Dockerfile):

```

FROM python:2

WORKDIR /usr/src/app

RUN pip install youtrack-scripts

CMD tail -f /dev/null

```

3 comments
Comment actions Permalink
Official comment

Hello Philipp, I'm sorry for the delayed response. For urgent questions, please use our main support channel by submitting a form: https://youtrack-support.jetbrains.com/hc/en-us/requests/new?ticket_form_id=66282

Could you please share the full command that you use for import? Also, the full output of running the command would also be helpful.

Thank you.

Comment actions Permalink

Hi,

what I posted is the full command:

`github2youtrack -t perm:__YOUTRACK_TOKEN__ https://iqb.myjetbrains.com _GH_USER_ _GH_PASSWORD_ iqb-berlin/testcenter-iqb-php`

I just replaced my GitHub credentials and my YouTrack token.

I also opened a ticket a while ago, it's far more readable there: https://youtrack.jetbrains.com/issue/JT-56148

0
Comment actions Permalink

Thanks for sharing the link! We'll provide support in the issue in the tracker then. We're going to need some more time for investigation, we'll get back to you when we have updates.

0

Please sign in to leave a comment.