question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

doit dumpdb fails when non default db name is used

See original GitHub issue

dumpdb does not take dep_file configuration into account because it does not read (or require a dodo.py). It would be better to use dep_file information if available.

Original report:


.doit.delayed.db file exists.

$ ./delayed.py dumpdb
DBM type is 'None'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/doit-0.29.0-py2.7.egg/doit/doit_cmd.py", line 168, in run
    return command.parse_execute(args)
  File "/usr/lib/python2.7/site-packages/doit-0.29.0-py2.7.egg/doit/cmd_base.py", line 122, in parse_execute
    return self.execute(params, args)
  File "/usr/lib/python2.7/site-packages/doit-0.29.0-py2.7.egg/doit/cmd_dumpdb.py", line 51, in execute
    data = dbm.open(dep_file)
  File "/usr/lib64/python2.7/anydbm.py", line 79, in open
    raise error, "need 'c' or 'n' flag to open new db"
error: need 'c' or 'n' flag to open new db

[delayed.py.txt](https://github.com/pydoit/doit/files/159206/delayed.py.txt)

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
schettino72commented, Jun 5, 2017

The dumpdb should print the name of the database file that it’s reading from, not just the type of the database.

So maybe you should create another ticket for this.

I would accept a patch where dumpdb reads a dodo.py and get the value of file_dep, but it must still be able to work without a dodo.py file.

0reactions
goerzcommented, Jun 5, 2017

Done (#183). If I have some time at some point in the near future, I might look into making such a pull request.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Postgres dump db - database - Stack Overflow
Some months ago I used a postgres in 9.5 version. I crated a database backup (by using pgadmin) and restored this backup in...
Read more >
How to backup and restore MySQL databases using the ...
In this article, I have explained how we can use mysqldump utility to backup and restore the MySQL database.
Read more >
A survey of doit sub-commands for task manipulation - pydoit
By default task names that start with an underscore(_) are not listed. They are listed if the option -p/–private is used. Task's file-dependencies...
Read more >
4.5.4 mysqldump — A Database Backup Program
mysqldump [options] --databases db_name ... mysqldump [options] --all-databases. To dump entire databases, do not name any tables following db_name , or use ......
Read more >
django-admin and manage.py
Outputs to standard output all data in the database associated with the named application(s). If no application name is provided, all installed applications ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found