Comments (2)
What is the error you get. The only thing different here is that you've removed the line wrap on the assert statement which a) shouldn't be a problem or throw an error and b) puts the line longer than 80 characters which is a violation of PEP 8 as seen here:
https://www.python.org/dev/peps/pep-0008/#maximum-line-length
from example-code.
Oddly enough, a syntax error, reproducing it minus personal information which I've substituted - we get this. This is a workaround - not a fix. 80 width on an editor may be an issue, since this is 82 characters.
I'll close if something here is trivial and being overlooked, but it seemed off...
Error:
`Traceback (most recent call last):
File "flags2_threadpool.py", line 49, in
from flags2_common import main, HTTPStatus # <2>
File "C:\countries\flags2_common.py", line 294
^
SyntaxError: invalid syntax`
so... say I'm running flags2_threadpool.py: Then you change flags2_common.py to my version, which is 2 characters in violation of PEP 8, therefor not a fix, but a workaround...
`PS C:\countries> py -3 flags2_threadpool.py
LOCAL site: http://localhost:8001/flags
Searching for 20 flags: from BD to VN
20 concurrent connections will be used.
100%|######################################################################################################################| 20/20 [00:01<00:00, 12.67it/s]
20 flags downloaded.
Elapsed time: 1.62s`
Is this a space case error on my part, or a legit one? I'm having trouble finding a documented version of something similar, so it may be human error of course, somehow, but it seemed like an interpreter problem or something else, so I thought I'd see what the community thought.
Using visual studio 2015 enterprise. The error didn't make sense to me but it's thrown and won't allow flags2_* scripts to run unless you take away the wrap and one line it. I said a work-around because it does violate the principle outlined in PEP 8, but allows you to continue moving if you're encountering an error too - I've since finished the book and didn't have any other problem cases. It didn't make sense to me, but it was the only way the script works as is. Violating a PEP by 2 characters.
Also, I tried toggling word wrap on/off in Visual Studio - didn't make a difference. Went through a couple sanity checks, just didn't get any progress without one-lining.
Any suggestions?
from example-code.
Related Issues (20)
- bug in bulk_item_promo HOT 1
- How to kill multiprocess parent program?
- ValueError: charset must not be in content_type argument
- FrozenJSON HOT 1
- How to maintain keys in TransformDict?
- _abc_registry attribute is not available in python 3.7.0 HOT 2
- 17-futures/countries/flags_asyncio.py fails to download flags HOT 1
- a mistake in example-code/18-asyncio/spinner_asyncio.py
- A typo in page 559
- Is there a plan to publish Fluent Python 2nd? HOT 3
- 18-asyncio/charfinder/http_charfinder.py 'Request' object has no Attribute 'GET' HOT 1
- Missing word in a sentence
- 17-futures-py3.7, toxiproxy settings update necessary
- about the hash() function HOT 1
- Illegal copy of book found. HOT 1
- 11-iface-abc/tombola_runner.py fixture 'cls' not found
- AttributeError
- fluentPython HOT 1
- Report an error on the file -- listcomp_speed.py
- Runtime error in Example A-2
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 example-code.