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

OperationalError while executing commands #43

Closed
ganeshhubale opened this issue Jan 13, 2020 · 3 comments
Closed

OperationalError while executing commands #43

ganeshhubale opened this issue Jan 13, 2020 · 3 comments

Comments

@ganeshhubale
Copy link
Contributor

ganeshhubale commented Jan 13, 2020

  • Install the project and hit below command directly.
  • I am getting error while executing commands such as - allpass, modpass
  • modpass
(new_en) [ghubale@localhost genpass]$ pygenpass modpass
Enter portal name [None]: paytm
Enter new password [None]: 
Traceback (most recent call last):
  File "/home/ghubale/mayuri/new_en/bin/pygenpass", line 11, in <module>
    load_entry_point('pygenpass==0.1', 'console_scripts', 'pygenpass')()
  File "/home/ghubale/mayuri/new_en/lib64/python3.7/site-packages/Click-7.0-py3.7.egg/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/ghubale/mayuri/new_en/lib64/python3.7/site-packages/Click-7.0-py3.7.egg/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/ghubale/mayuri/new_en/lib64/python3.7/site-packages/Click-7.0-py3.7.egg/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ghubale/mayuri/new_en/lib64/python3.7/site-packages/Click-7.0-py3.7.egg/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/ghubale/mayuri/new_en/lib64/python3.7/site-packages/Click-7.0-py3.7.egg/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/ghubale/mayuri/new_en/lib64/python3.7/site-packages/pygenpass-0.1-py3.7.egg/genpass/password.py", line 63, in modpass
    db_obj.update_data(portal_name=portal_name, password=mod)
  File "/home/ghubale/mayuri/new_en/lib64/python3.7/site-packages/pygenpass-0.1-py3.7.egg/genpass/database.py", line 77, in update_data
    (self.password, self.portal_name),
sqlite3.OperationalError: no such table: passwords

  • allpass:
(new_en) [ghubale@localhost genpass]$ pygenpass allpass
Traceback (most recent call last):
  File "/home/ghubale/mayuri/new_en/bin/pygenpass", line 11, in <module>
    load_entry_point('pygenpass==0.1', 'console_scripts', 'pygenpass')()
  File "/home/ghubale/mayuri/new_en/lib64/python3.7/site-packages/Click-7.0-py3.7.egg/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/ghubale/mayuri/new_en/lib64/python3.7/site-packages/Click-7.0-py3.7.egg/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/ghubale/mayuri/new_en/lib64/python3.7/site-packages/Click-7.0-py3.7.egg/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ghubale/mayuri/new_en/lib64/python3.7/site-packages/Click-7.0-py3.7.egg/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/ghubale/mayuri/new_en/lib64/python3.7/site-packages/Click-7.0-py3.7.egg/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/ghubale/mayuri/new_en/lib64/python3.7/site-packages/pygenpass-0.1-py3.7.egg/genpass/password.py", line 39, in allpass
    all_pass = db_obj.show_all_data()
  File "/home/ghubale/mayuri/new_en/lib64/python3.7/site-packages/pygenpass-0.1-py3.7.egg/genpass/database.py", line 96, in show_all_data
    """SELECT * FROM passwords"""
sqlite3.OperationalError: no such table: passwords
(new_en) [ghubale@localhost genpass]$ 

  • delpass
(new_en) [ghubale@localhost genpass]$ pygenpass delpass
Enter portal name [None]: 
Traceback (most recent call last):
  File "/home/ghubale/mayuri/new_en/bin/pygenpass", line 11, in <module>
    load_entry_point('pygenpass==0.1', 'console_scripts', 'pygenpass')()
  File "/home/ghubale/mayuri/new_en/lib64/python3.7/site-packages/Click-7.0-py3.7.egg/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/ghubale/mayuri/new_en/lib64/python3.7/site-packages/Click-7.0-py3.7.egg/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/ghubale/mayuri/new_en/lib64/python3.7/site-packages/Click-7.0-py3.7.egg/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ghubale/mayuri/new_en/lib64/python3.7/site-packages/Click-7.0-py3.7.egg/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/ghubale/mayuri/new_en/lib64/python3.7/site-packages/Click-7.0-py3.7.egg/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/ghubale/mayuri/new_en/lib64/python3.7/site-packages/pygenpass-0.1-py3.7.egg/genpass/password.py", line 55, in delpass
    db_obj.delete_data(portal_name=portal_name)
  File "/home/ghubale/mayuri/new_en/lib64/python3.7/site-packages/pygenpass-0.1-py3.7.egg/genpass/database.py", line 67, in delete_data
    """DELETE from passwords where portal_name = ?""", (self.portal_name,)
sqlite3.OperationalError: no such table: passwords
  • showpass
(new_en) [ghubale@localhost genpass]$ pygenpass showpass
Enter portal name [None]: paytm
Traceback (most recent call last):
  File "/home/ghubale/mayuri/new_en/bin/pygenpass", line 11, in <module>
    load_entry_point('pygenpass==0.1', 'console_scripts', 'pygenpass')()
  File "/home/ghubale/mayuri/new_en/lib64/python3.7/site-packages/Click-7.0-py3.7.egg/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/ghubale/mayuri/new_en/lib64/python3.7/site-packages/Click-7.0-py3.7.egg/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/ghubale/mayuri/new_en/lib64/python3.7/site-packages/Click-7.0-py3.7.egg/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ghubale/mayuri/new_en/lib64/python3.7/site-packages/Click-7.0-py3.7.egg/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/ghubale/mayuri/new_en/lib64/python3.7/site-packages/Click-7.0-py3.7.egg/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/ghubale/mayuri/new_en/lib64/python3.7/site-packages/pygenpass-0.1-py3.7.egg/genpass/password.py", line 105, in showpass
    spass = db_obj.show_data(portal_name)
  File "/home/ghubale/mayuri/new_en/lib64/python3.7/site-packages/pygenpass-0.1-py3.7.egg/genpass/database.py", line 86, in show_data
    """SELECT password FROM passwords WHERE portal_name=?""", (self.portal_name,)
sqlite3.OperationalError: no such table: passwords
@ganeshhubale ganeshhubale changed the title OperationalError while executing allpass command OperationalError while executing commands Jan 13, 2020
@mayurilahane
Copy link
Member

Which python version you have?

@ganeshhubale
Copy link
Contributor Author

  • Python version: 3.7 but it is not issue with python version. Even I tried it with other versions. Still same error occurring.
  • IMO these commands tries to fetch values from table(passwords) directly and this table gets created whenever we try to save or createpass.
  • So because of unavailability of that table in DB. The queries fired by these commands gets failed.

@mayurilahane
Copy link
Member

Fixed #44

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

2 participants