emirozer/fake2db

Not sure how to start with.

emprit1988 opened this issue · 2 comments

Hi,
I've installed fake2db successfully in ubuntu 14.04 and still, i'm unable to run cli commands as shown in readme.

Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

fake2db --rows 100 --db postgresql --name testdb
File "", line 1
fake2db --rows 100 --db postgresql --name testdb
^
SyntaxError: invalid syntax

bhrgu commented

Looks like you are trying to run the command via Python interpreter instead of your system shell, e.g. bash

Python 2.7.6 (default, Oct 26 2016, 20:30:19) 
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> fake2db --rows 10 --db sqlite 
  File "<stdin>", line 1
    fake2db --rows 10 --db sqlite 
                    ^
SyntaxError: invalid syntax

You just need to run fake2db as regular command if you have installed it system wide (sudo pip install fake2db):

user@host:~$ fake2db --rows 10 --db sqlite 
2017-08-29 15:28:27,894 bhrigu   Rows argument : 10
2017-08-29 15:28:27,925 bhrigu   Database created and opened succesfully: sqlite_MDAUFXKR.db
2017-08-29 15:28:27,973 bhrigu   simple_registration Commits are successful after write job!
2017-08-29 15:28:28,017 bhrigu   detailed_registration Commits are successful after write job!
2017-08-29 15:28:28,082 bhrigu   companies Commits are successful after write job!
2017-08-29 15:28:28,142 bhrigu   user_agent Commits are successful after write job!
2017-08-29 15:28:28,195 bhrigu   customer Commits are successful after write job!
user@host:~$ ls *sqlite*
sqlite_MDAUFXKR.db

@bhrgu
Thanks for your support. I have solved this by uninstalling and reinstalling fake2db as suggested in this post. [https://github.com//issues/33]