Comments (3)
No immediate idea, and I can't duplicate it here.
Ξ Projects/alchemist git:(master) ▶ ipython
Python 2.7.3 (default, Dec 27 2012, 21:12:10)
Type "copyright", "credits" or "license" for more information.
IPython 0.13 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: %cd ~/Projects/pyisbn/
/home/jay/Projects/pyisbn
In [2]: from tests import test_data
In [3]: isbns = test_data.TEST_BOOKS.values()
In [4]: isbns.insert(40, '123')
In [5]: import pyisbn
In [6]: filter(lambda s: not pyisbn.validate(s), isbns)
---------------------------------------------------------------------------
IsbnError Traceback (most recent call last)
<ipython-input-6-1288e1dd640e> in <module>()
----> 1 filter(lambda s: not pyisbn.validate(s), isbns)
<ipython-input-6-1288e1dd640e> in <lambda>(s)
----> 1 filter(lambda s: not pyisbn.validate(s), isbns)
/home/jay/Projects/pyisbn/pyisbn/__init__.pyc in validate(isbn)
420
421 """
--> 422 isbn = _isbn_cleanse(isbn)
423 return isbn[-1].upper() == calculate_checksum(isbn[:-1])
/home/jay/Projects/pyisbn/pyisbn/__init__.pyc in _isbn_cleanse(isbn, checksum)
337 raise IsbnError('non-digit checksum')
338 else:
--> 339 raise IsbnError('ISBN must be either 10 or 13 characters long')
340 else:
341 if len(isbn) == 8:
IsbnError: ISBN must be either 10 or 13 characters long
In [7]:
The only thing I'd guess at from looking at your paste is that your terminal got itself in a bad state. Given the way the output is mixed it looks like a buffering problem unrelated to pyisbn
.
Can you reproduce the problem using the plain python interpreter, or on a non-Windows system?
from pyisbn.
I can't reproduce it in the regular python interpreter, but have done so several times in ipython although not consistently. You're probably right in your guess. For now, I'll keep an eye out and let you know if anything interesting happens. Thanks man.
from pyisbn.
have done so several times in ipython although not consistently.
FWIW, I've just tried a few more times and still can't reproduce it.
For now, I'll keep an eye out and let you know if anything interesting happens.
Absolutely.
I'm closing this issue as it doesn't appear to be pyisbn
related, but feel free to re-open it or open another one if some new information comes to light.
from pyisbn.
Related Issues (10)
- easy_install broke because of 404 URL HOT 1
- Join forces HOT 1
- Initial Update HOT 1
- pyisbn allows some invalid ISBNs HOT 1
- Dependabot couldn't authenticate with https://pypi.python.org/simple/
- easy_install fails with syntax error in setup.py HOT 1
- Support hyphenation of ISBNs when converting to str() HOT 6
- Quick request HOT 2
- Handling unicode isbn for _isbn_cleanse HOT 6
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 pyisbn.