fogbugz importer not working?
I get this when I try to run the importer... I don't see this soap client in the package.. do I need some dependencies from somewhere? it's not mentioned in the docs.
Traceback (most recent call last):
File "fb2youtrack.py", line 9, in <module>
from fbugz.fbSOAPClient import FBClient
ImportError: No module named fbugz.fbSOAPClient
Please sign in to leave a comment.
I have the same problem when trying to test this out, it looks like the most recent version of the tools download is missing a large chunk of the fogbugz-related files.
Hello!
That was our mistake. You can download correct version of library from here: http://www.jetbrains.com/youtrack/tools/index.html
Traceback (most recent call last):
File "fb2youtrack.py", line 9, in <module>
from fbugz.fbSOAPClient import FBClient
File "/Users/dbachelder/Downloads/python 2/fbugz/fbSOAPClient.py", line 1, in <module>
from fbugz.fogbugz import FogBugz
File "/Users/dbachelder/Downloads/python 2/fbugz/fogbugz.py", line 4, in <module>
from BeautifulSoup import BeautifulSoup, CData
ImportError: No module named BeautifulSoup
db
Chowda, you'll have to install easy_install for python, add c:\pythonYY and c:\pythonYY\scripts to your PATH, and then do:
easy_install beautifulsoup
Thanks Dan,
Made it alot further
but now I get
Unknown project names. Exiting...
Not real sure what the problem could be there, are you sure those are "projects" and not "areas"? The mismatch between youtrack and fogbugz terminology is a bit confusing.
I'm running into issues because our Fogbugz is integrated with LDAP and the user import is not quite right, so I haven't gotten that far, but it did bring in the first project I listed fine.
I edited the script to spit out what it's looking for and I get "Русский"
which is decidedly not the project name... I'm trying to debug it more now... learning python one debug statement at a time :-)
Yeah, I hacked up the initial call on my script to put the projects in - it looks like yours is reading projects from fbugz/defaultFBugz.py
Seems that you used default values of test project.
You should use your own settings.
Sergey.
Yeah, I found that problem thanks... now I debugging some other issues..
Traceback (most recent call last):
File "fb2youtrack.py", line 226, in <module>
main()
File "fb2youtrack.py", line 33, in main
fb2youtrack(target_url, target_login, target_password, source_url, source_login, source_password, project_names, max_issue_id)
File "fb2youtrack.py", line 144, in fb2youtrack
target.createGroup(group)
File "/Users/dbachelder/Downloads/python 2/youtrack/connection.py", line 311, in createGroup
'/admin/group/%s?description=noDescription&autoJoin=false' % group.name.replace(' ', '%20'))
ValueError: too many values to unpack
I was able to fix this by changing the list under "Importing users" to just ['Normal', 'Deleted'] - I think "Community" and "Virtual" don't exist in certain fogbugz installs/versions.
It looks like it's the Deleted group that's having problems... and we do have a user in that group so if I remove it from that list, it ends up bombing out further in when it tries to add that user.
Well, I made it pretty far.. even got some issues in.. but it kept dying for various reasons and I ran out of time to play with it.. this import script needs some serious error handling upgrades!
Could you please provide errors, that it returns, so we'll now what exactly should be fixed?
There's something wrong with how LDAP users are mapped, because you replace spaces with "_" when creating the user but not when looking it up.
I have a patch of the stuff I hacked up to try to get this working - I would really like to use the sLDAPuid field that Fogbugz has as the user id, but I couldn't figure out all the correct places to change it and how to map the comments to the correct users then, because the comments appear to store the full name instead of the LDAP login.
My patch lets it import some issues at least, and makes it easier to re-run after failures by capturing more of the exceptions on things like re-adding subsystems and custom fields.
Then midway through importing my first project I get this exception, I assume on some case that has an attachment:
Traceback (most recent call last):
File ".\fb2youtrack.py", line 247, in <module>
main()
File ".\fb2youtrack.py", line 33, in main
fb2youtrack(target_url, target_login, target_password, source_url, source_login, source_password, project_names, max_issue_id)
File ".\fb2youtrack.py", line 228, in fb2youtrack
target.createAttachmentFromAttachment(full_issue_id, attach)
File "C:\Users\dfitch\Downloads\youtrack-python-api-3_0\python\youtrack\connection.py", line 105, in createAttachmentFromAttachment
group=a.group if hasattr(a, 'group') else None)
File "C:\Users\dfitch\Downloads\youtrack-python-api-3_0\python\youtrack\connection.py", line 139, in createAttachment
raise e
urllib2.HTTPError: HTTP Error 400: Bad Request
Can you find out from ligs, the name of file, that is attaching?
I've fixed issue with attachment.
You can replace your connection.py file with the file I've attached.
Attachment(s):
connection.py.zip
It gets further now, but still throws an attachment error, possibly different. (below)
Another minor issue is if subsystems (on closed calls) have been deleted, the importer doesn't know to bring them over, and then it doesn't import those old calls.
Traceback (most recent call last):
File ".\fb2youtrack.py", line 249, in <module>
main()
File ".\fb2youtrack.py", line 33, in main
fb2youtrack(target_url, target_login, target_password, source_url, source_login, source_password, project_names, max_issue_id)
File ".\fb2youtrack.py", line 230, in fb2youtrack
target.createAttachmentFromAttachment(full_issue_id, attach)
File "C:\Users\dfitch\Downloads\youtrack-python-api-3_0\python\youtrack\connection.py", line 105, in createAttachmentFromAttachment
group=a.group if hasattr(a, 'group') else '')
File "C:\Users\dfitch\Downloads\youtrack-python-api-3_0\python\youtrack\connection.py", line 139, in createAttachment
raise e
urllib2.HTTPError: HTTP Error 404: Not Found
This attachment exception is thrown because some of hte issues were not imported. In your import logs should be something like
Issue [..] imported successfully
Issue [..] imported successfully
Issue [..] imported successfully
Failed to import issue [..]
and then goes xml wth responce and server request.
Can you attach it? Or if there is some of your private data, you can attach it to this issue http://youtrack.jetbrains.net/issue/JT-10285
It doesn't look like the exception is getting caught, so I don't get a message of what issue it failed on - it looks like this in the console:
...
Issue [ 41-9028 ] imported successfully
Issue [ 41-9029 ] imported successfully
Traceback (most recent call last):
File ".\fb2youtrack.py", line 249, in <module>
main()
File ".\fb2youtrack.py", line 33, in main
fb2youtrack(target_url, target_login, target_password, source_url, source_login, source_password, project_names, max_issue_id)
File ".\fb2youtrack.py", line 230, in fb2youtrack
target.createAttachmentFromAttachment(full_issue_id, attach)
File "C:\Users\dfitch\Downloads\youtrack-python-api-3_0\python\youtrack\connection.py", line 105, in createAttachmentFromAttachment
group=a.group if hasattr(a, 'group') else '')
File "C:\Users\dfitch\Downloads\youtrack-python-api-3_0\python\youtrack\connection.py", line 139, in createAttachment
raise e
urllib2.HTTPError: HTTP Error 404: Not Found
At first script import 30 issues, next imports tags and attachments to them, then next 30 issues and so on.
Please, ensure, that htere were no error reports in previous 30 issues.
Aha, there are errors in the last 30.
It is the issue where there are old closed cases with Fogbugz "areas" that have been deleted, and the subsystems importing only imports the "current" areas.
So then Fogbugz tickets with old deleted areas fail to import.
do you really neewd this issues? I've created an issue about this --http://youtrack.jetbrains.net/issue/JT-10285
but as a quick fix you can just wrap
target.createAttachmentFromAttachment(full_issue_id, attach)
and
target.executeCommand(full_issue_id, 'tag ' + tag)
with try\catch block
If I'm going to convince my bosses and team that it's worth switching, we probably do need to get all old casework in to the system.
Thanks for all your help...
I'll fix this issue in several days, and let you know as soon as possible
I've attached fixed version of python library to tis message.
Attachment(s):
python.zip
removed
Message was edited by: chowda - obsolete message about error in previous version of plugin
Using the zip at the bottom of this thread I made it much further... imported quite a few issues... but died here:
Traceback (most recent call last):
File "fb2youtrack.py", line 228, in <module>
main()
File "fb2youtrack.py", line 27, in main
fb2youtrack(target_url, target_login, target_password, source_url, source_login, source_password, project_names, max_issue_id)
File "fb2youtrack.py", line 209, in fb2youtrack
target.createAttachmentFromAttachment(full_issue_id, attach)
File "/Users/me/Downloads/python/youtrack/connection.py", line 105, in createAttachmentFromAttachment
group=a.group if hasattr(a, 'group') else '')
File "/Users/me/Downloads/python/youtrack/connection.py", line 139, in createAttachment
raise e
urllib2.HTTPError: HTTP Error 404: Not Found
Could you please provide log of the importer?
could I email it to you?