Comments (9)
Hm, I can't repro on OS X:
$ touch /tmp/empty
$ fido /tmp/zero
FIDO v1.3.1 (formats-v84.xml, container-signature-20151217.xml, format_extensions.xml)
FIDO: Zero byte file (empty): Path is: /tmp/zero
bad repeat interval
bad repeat interval
KO,201,,,,0,"/tmp/zero",,"fail"
FIDO: Processed 1 files in 283.72 msec, 4 files/sec
(Note that despite FIDO listing itself as 1.3.1 I am using the latest tarball release.)
from fido.
Hi Misty,
I installed from PIP and so I removed that and then installed from the downloadable releases to try again also:
Zip:
goatslayer@goatslayer-acer-linux:~/Desktop/fido/fido-1.3.3-84$ fido tmp/empty-file
FIDO v1.3.3 (formats-v84.xml, container-signature-20160121.xml, format_extensions.xml)
FIDO: Zero byte file (empty): Path is: tmp/empty-file
Traceback (most recent call last):
File "/usr/local/bin/fido", line 9, in <module>
load_entry_point('opf-fido==1.3.3', 'console_scripts', 'fido')()
File "/usr/local/lib/python2.7/dist-packages/opf_fido-1.3.3-py2.7.egg/fido/fido.py", line 855, in main
fido.identify_file(file)
File "/usr/local/lib/python2.7/dist-packages/opf_fido-1.3.3-py2.7.egg/fido/fido.py", line 375, in identify_file
bofbuffer, eofbuffer = self.get_buffers(f, size, seekable=True)
ValueError: too many values to unpack
goatslayer@goatslayer-acer-linux:~/Desktop/fido/fido-1.3.3-84$
Tarball:
goatslayer@goatslayer-acer-linux:~/Desktop/fido/fido-1.3.3-84-tar$ touch tmp/empty-file
goatslayer@goatslayer-acer-linux:~/Desktop/fido/fido-1.3.3-84-tar$ fido tmp/empty-file
FIDO v1.3.3 (formats-v84.xml, container-signature-20160121.xml, format_extensions.xml)
FIDO: Zero byte file (empty): Path is: tmp/empty-file
Traceback (most recent call last):
File "/usr/local/bin/fido", line 9, in <module>
load_entry_point('opf-fido==1.3.3', 'console_scripts', 'fido')()
File "/usr/local/lib/python2.7/dist-packages/opf_fido-1.3.3-py2.7.egg/fido/fido.py", line 855, in main
fido.identify_file(file)
File "/usr/local/lib/python2.7/dist-packages/opf_fido-1.3.3-py2.7.egg/fido/fido.py", line 375, in identify_file
bofbuffer, eofbuffer = self.get_buffers(f, size, seekable=True)
ValueError: too many values to unpack
Differences in Python version?
from fido.
Hm, also cannot reproduce. I note fido.py can return three values when the length of the BOF buffer is zero, which seems strange as it usually returns two values. Perhaps this check has moved further up the call chain and this is now dead code that shouldn't get called?
@ross-spencer Any chance you've got an old version of Fido installed somewhere else? (under the old package name?!)
UPDATE Hah, I've managed to break my installation and reproduce this error by using python setup.py install
to install fido 1.1.1 from source and then removing it and reinstalling via pip. Not sure what's gone wrong! Something somewhere must be cached. Maybe a pyc file?!
UPDATE 2 @mistydemeo or perhaps you have the old version cached in site-package?
from fido.
Thanks @anjackson - I haven't been using FIDO on this machine up until today so I wasn't expecting it to be something legacy on my system - from your update do you still think it might be a conflict between an old and a new version?
from fido.
If it is, then AFAICT it's the other way around - ie Fido was was only working for me (and is only working for @mistydemeo) because we had/have old Fido installs on the PYTHONPATH.
from fido.
Cool. Thanks Andy. If it turns out that it is my install then I can nuke whatever I need to nuke and then try again too. I would have looked at the code today as well but had a few other priorities to work on first.
from fido.
It looks like it was in fact old FIDO installs for me; after nuking my virtualenv I'm now seeing this same behaviour.
from fido.
I believe this was introduced by 6c7f798. get_buffers
used to branch in a couple of places on length == None
, which was changed to check length
's falsiness. However, if length
is zero - as it is, for example, in a zero-byte file - then this proceeds down a branch that previously shouldn't have been possible.
from fido.
Thanks @mistydemeo, I definitely should pay more attention to changes like that in the future. @jhsimpson will merge #74 soon.
from fido.
Related Issues (20)
- Question re: regex used in FIDO HOT 3
- Price-matching other repos HOT 3
- No 1.4.0 release available HOT 1
- Crash on XLS format 59 HOT 3
- FIDO should use the latest PRONOM release (v.96)
- 1.4.1 wheel does not match source, missing format file HOT 1
- Pronom version number needs to be updated HOT 2
- setuptools requirement in setup.py:install_requires is unsafe HOT 1
- Fido hanging on skeleton stream (fmt/1000) HOT 3
- Current fido release 1.4.1 does not find pronom v95 HOT 1
- olefile as a dependency at version >= 0.46 HOT 2
- fido documentation link fails HOT 2
- Updating signatures fails when the URL of the reference file identifier can't be found HOT 2
- convert PRONOM formats to FIDO signature fails HOT 7
- Migrate from 1.4.1 to 1.6.1 : FileNotFoundError: [Errno 2] No such file or directory: '.../fido/conf/formats-v104.xml' HOT 13
- Automation of update of FIDO signature site HOT 1
- Python 2 begone. HOT 1
- Migrate FIDO documentation to docs directory HOT 1
- FIDO should support multiple signature sources
- fido uses PRONOM v109
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fido.