Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Bio-Phylo CPAN distribution.

Report information
The Basics
Id: 41075
Status: resolved
Priority: 0/
Queue: Bio-Phylo

People
Owner: Nobody in particular
Requestors: florent.angly [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.17_RC6
Fixed in: (no value)



Subject: Error when opening tree files
I get the following error when I open tree files with Phylo: Show quoted text
-------------------------- EXCEPTION ---------------------------- Message: Inappropriate ioctl for device An exception of type Bio::Phylo::Util::Exceptions::FileError was thrown. This kind of error happens when a file can not be accessed.
------------------------- STACK TRACE --------------------------- STACK: Bio::Phylo::IO::parse('Bio::Phylo::IO', '-file', 'simple_tree.tre', '-format', 'newick') called at phylo_read_file_bug.pl line 6 This problem seems to be fixable by editing the Bio::Phylo->parse function and replacing: if ($!) { Bio::Phylo::Util::Exceptions::FileError->throw( error => $! ); } by: if ( (not defined $fh) || $fh->error) { Bio::Phylo::Util::Exceptions::FileError->throw( error => $! ); } After editing, no error occurs and the Bio::Phylo::Forest::Tree is created and populated properly.
Subject: simple_tree.tre
Download simple_tree.tre
application/octet-stream 39b

Message body not shown because it is not plain text.

Subject: phylo_read_file_bug.pl
# Read tree file in Phylo use Bio::Phylo::IO; use Data::Dumper; my $file = 'simple_tree.tre'; my $tree = Bio::Phylo::IO->parse( '-file' => $file, '-format' => 'newick', )->first; print Dumper($tree);
Dear fangly, I believe this issue is now resolved. File handles are now created differently, using: my $fh = IO::File->new; $fh->open( $filename, 'r' ) or throw 'FileError' => $!; This should fix the problem you were having. Thank you for bringing this to my attention, please don't hesitate to contact me again if things don't work. Best wishes, Rutger Vos