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.

tabledump is broken when the output file is not specified

See original GitHub issue

It seems that previously an HDU could access to its parent HDUList with a _HDUList__file attribute, and this was used to get the filename. I think the simplest solution would be to make the output file mandatory (datafile).

In [3]: fits.tabledump('astropy/io/fits/tests/data/tb.fits')
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-3-c48651aaf53f> in <module>()
----> 1 fits.tabledump('astropy/io/fits/tests/data/tb.fits')

~/dev/astropy/astropy/utils/decorators.py in wrapper(*args, **kwargs)
    485                         # one with the name of the new argument to the function
    486                         kwargs[new_name[i]] = value
--> 487             return function(*args, **kwargs)
    488 
    489         return wrapper

~/dev/astropy/astropy/io/fits/convenience.py in tabledump(filename, datafile, cdfile, hfile, ext, overwrite)
    888             # TODO: Really need to provide a better way to access the name of
    889             # any files underlying an HDU
--> 890             root, tail = os.path.splitext(f._HDUList__file.name)
    891             datafile = root + '_' + repr(ext) + '.txt'
    892 

AttributeError: 'HDUList' object has no attribute '_HDUList__file'

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:19 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
maciccocommented, Feb 12, 2018

YEAH ! No error !!

1reaction
vermashresthcommented, Dec 11, 2017

@ricardogando Sure! No problem. I will try some other issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

not able to take single table dump from postgresql using ansible
its taken dump file , but that is full schema , i want only single table from schema, i used target_opts: "-n test-table.test-schema"...
Read more >
mariadb-dump/mysqldump
Used for producing a dump file from a replica server that can be used to set up another replica server with the same...
Read more >
mysqldump with multiple tables with or without where clause
My problem is I want to take some data from some tables that only date back certain days and would like to keep...
Read more >
MySQL Shell 8.0 :: 11.5 Instance Dump Utility, Schema Dump ...
The dumps created by MySQL Shell's instance dump utility, schema dump utility, and table dump utility comprise DDL files specifying the ...
Read more >
SQL error messages and exceptions - Apache DB Project
Table/View ' <objectName> ' does not exist. 42X06, Too many result columns specified for table ' <tableName> '. 42X07, Null is only allowed...
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