Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mysql : This isn't currently supported. Aborting. #560

Closed
N3bTcx opened this issue Jul 2, 2014 · 8 comments
Closed

Mysql : This isn't currently supported. Aborting. #560

N3bTcx opened this issue Jul 2, 2014 · 8 comments

Comments

@N3bTcx
Copy link

N3bTcx commented Jul 2, 2014

Hello

I'm using the last git version of willie with python2.7
When I'm running willie --configure-database I get This isn't currently supported. Aborting.

I'am on a debian 6 with python2.7-dev and python-mysqldb and mysql installed. Never add the probleme before on other system.

Thanks in advance

@tyrope
Copy link

tyrope commented Jul 7, 2014

Does willie run properly without any parameters?

@N3bTcx
Copy link
Author

N3bTcx commented Jul 7, 2014

Hello @tyrope

Thanks for you message.

When msyql is choose I get this. Before set up willie was working but I would like to rss.

willie
Error: Unable to connect to user settings DB.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/willie/__init__.py", line 49, in run
    p = bot.Willie(config)
  File "/usr/local/lib/python2.7/dist-packages/willie/bot.py", line 92, in __init__
    self.db.add_table('preferences', ['name'], 'name')
  File "/usr/local/lib/python2.7/dist-packages/willie/db.py", line 315, in add_table
    db = self.connect()
  File "/usr/local/lib/python2.7/dist-packages/willie/db.py", line 367, in connect
    db=self._dbname
  File "/usr/lib/python2.7/dist-packages/MySQLdb/__init__.py", line 81, in Connect
    return Connection(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 187, in __init__
    super(Connection, self).__init__(*args, **kwargs2)
TypeError: connect() argument 1 must be string, not None

@phantium
Copy link
Contributor

phantium commented Jul 8, 2014

As I'm somehow not able to attach code to this ticket via a pull request, please see here;
#567

I have fixed the issue on my end by changing this.

@N3bTcx
Copy link
Author

N3bTcx commented Jul 8, 2014

Hello

I've tried your edit and removed the brackets but nothing change.
Still

willie --configure-database
What type of database would you like to use? (sqlite/mysql/postgres) [mysql]:
This isn't currently supported. Aborting.

and

Error: Unable to connect to user settings DB.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/willie/__init__.py", line 49, in run
    p = bot.Willie(config)
  File "/usr/local/lib/python2.7/dist-packages/willie/bot.py", line 92, in __init__
    self.db.add_table('preferences', ['name'], 'name')
  File "/usr/local/lib/python2.7/dist-packages/willie/db.py", line 315, in add_table
    db = self.connect()
  File "/usr/local/lib/python2.7/dist-packages/willie/db.py", line 367, in connect
    db=self._dbname
  File "/usr/lib/python2.7/dist-packages/MySQLdb/__init__.py", line 81, in Connect
    return Connection(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 187, in __init__
    super(Connection, self).__init__(*args, **kwargs2)
TypeError: connect() argument 1 must be string, not None

@phantium
Copy link
Contributor

phantium commented Jul 8, 2014

Do you have MySQLdb installed? It's only added as a supported db type if it's installed.
For me this fix works just fine.

P.s. your traceback is totally unrelated to this issue.

@N3bTcx
Copy link
Author

N3bTcx commented Jul 8, 2014

Thanks a lot @phantium for your help.

Yes python-mysqldb is already installed and I'm using mysql already with other service.

Removing bracket is the only thing I have to do?

@phantium
Copy link
Contributor

phantium commented Jul 9, 2014

Yes change the line to:
elif config.db.userdb_type in non_sqlite_dbs:

I've tested this on several machines and this is the solution to the issue.

If after changing this it still doesn't work for you, I'm not sure what causes that as I cannot reproduce it.

Which Linux distribution are you running and which Python version?

@N3bTcx
Copy link
Author

N3bTcx commented Jul 9, 2014

Ok it's now fixed. The modifications were no reported on the installed willie version and I've configured the mysql database myself like mentionned here > #515

Everythings works now. Thanks a lot @phantium

@N3bTcx N3bTcx closed this as completed Jul 9, 2014
elad661 pushed a commit that referenced this issue Jul 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants