Importing from Mantis without having direct access to the server

I want to migrate to YouTrack, after having used Mantis in a hosted server.

First of all, I'm not really used to Python... actually, I've never used it, except indirectly.

Following the not-so-clear instruction, I've realized that:

- I must have remote access to the MySql server: done

- I must find and install some "Python library mySQLdb" (I've eventually managed to find it and even to follow the additional instruction to build the setup.py file).

From this point, when I've found out that the mySQLdb library was supposed to run on the MySQL database (or not?) I've realized that I had only wasted my time and installed stuff (Python) I don't need on my computer.

Since this is a shared hosting, I don't have direct access to the server, therefore I can't install or run Python scripts.

Why importing data should be such a cumbersone operation?

I'm not talking just about Mantis itself. Almost all of them provides some sort of webservice (Mantis has at least SOAP service): wouldn't be way easier from JetBrains to add an import feature, that fetches this data?

...Or, since usually this is a one-time operation, they could just write a stand-alone add-on that does the job.

What surprise me more is that Jetbrains products are intuitives and user-friendly, as much as the importing process is cumbersome and "user-enemy": it's a paradox.

Anyway, back on topic, could someone shed a light to a poort stupid guy that maybe has got too used to wizards forms?

P.S.: sorry for my English...

0
13 comments
Avatar
Permanently deleted user

Hello, Andrea!

You do not need to run python script directly on server where Mantis runs. You must only have access to database. Do you know host and port where your Mantis DB is? If you hsve, you can run scripts on any computer.

0

Hello Anna.

yes, I do know host and port of Mantis DB, but still I do not understand how to proceed.

I've tried to run the script, but it says something about a module. I think is the mySQLdb module that requires some configuration file I do not have.

Before that I don't know what to do with the site.cfg file: should I edit it or should I keep it as is?

Then, from MySQLdb README file: "The setup.py script uses mysql_config to find all compiler and linker options". Well, where is supposed to be this "mysql_config" file or, if I should create te file from scratch, what is supposed to be inside this file?

This is what I mean when I define the importing process cumbersome... or at least, not clear enough.

0

...Anyone willing/able to help?

0
Avatar
Permanently deleted user

Could you please provide output of the import? I'll see what error is it and how to fix this.

0

Of course.

I'm running it from a Mac.

This is the output:

Traceback (most recent call last):

  File "mantis2youtrack.py", line 2, in <module>

    from mantis.mantisClient import MantisClient

  File "/Users/andrea/Downloads/python/mantis/mantisClient.py", line 1, in <module>

    import MySQLdb

ImportError: No module named MySQLdb

Thanks.
0
Avatar
Permanently deleted user

Am I right, that you've installed MySQLdb module on your computer? Where did you get this library from?

0

Well, this is one of the points of my post. As I've written previously

from MySQLdb README file: "The setup.py script uses mysql_config to find all compiler and linker options". Well, where is supposed to be this "mysql_config" file or, if I should create te file from scratch, what is supposed to be inside this file

After this post, I've found the MySQLdb library (here) and tried to follow the instruction.

I've got stuck to the part that says

The setup.py script uses mysql_config to find all compiler and linker options, and should work as is on any POSIX-like platform, so long as mysql_config is in your path.

In addition, yes, I've downloaded the library, and even compiled and installed it (pretending that the mysql_config part wasn't so important, but still following the instruction in the readme file). But I get the error I've pasted in the previous answer.

I'm sure it has to do with MySQLdb, but since I don't hav the slightest clue of what I'm doing, I can't troubleshoot on my own.

Again, the "Import from Mantis" (or any other platform) instruction, could be improved for monkey-proof instructions.

...ok, I'm quite sure I'm not a monkey, but still, I can't know everything, can I? ;-\

0
Avatar
Permanently deleted user

looks like there is some general problem with installing MyAQLdb for Mac. Could you please specify versions of your os, python and MySQLdb? When I know version I'll be able to look for solution for you.

0

Thank you Anna.

Here are the info you asked:

  • Mac OS X 10.7.1
  • Python 2.7.2 for Mac (from this page)
  • mySQLdb (not sure about the version, but I've got it from this page)
0

Hello.

Any news about this matter?

0
Avatar
Permanently deleted user

Yes, sorry, looks like there is no straight descision to install mySQLdb on mac without installing mySql on your computer. So you have two options:

1) You can install mySql server to your computer and follow this: http://openlandscape.net/2007/11/16/setting-up-mysql-for-python-mysqldb-on-mac-os-x/ instruction

2) You can try to run import from some other computer, that has another OS installed on it.

0

Ok. I'll try from a Windows machine and as soon as I've some updates, I'll update this post.

Thank you so far.

0

I'm afraid this won't work without having MySql installed in the machine (regardless is Mac OS, Windows or Linux), since the MySql python module needs, to find a local installation of MySql. From the MySql python module's README file:

The setup.py script uses mysql_config to find all compiler and linker options, and should work as is on any POSIX-like platform, so long as mysql_config is in your path.

So the importing tool needs to run where the MySql database runs. And since I'm using an hosting service I just can't use it.

I still wonder why you do not provide a more usable and independent way to import data: there are solution to access Mantis's data remotely. Also most of the other bug/issue tracker system provides similar means to access data remotely.

I underst that your Python script is one and that all other version use just a different mapping, so it's an easy way for you to maintain a single script, but I wonder how many users like me are frustrated not to be able to use it.

I'll probably import my data manually, it will takes ages, and I'm not even sure I'll be able to do it, but I just can't keep wasting my time with something I can't use anyway.

Thank you by the way.

0

Please sign in to leave a comment.