Giter Club home page Giter Club logo

Comments (2)

stroke-one avatar stroke-one commented on June 16, 2024

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.

 avatar commented on June 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.