Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Exception of an indent block if it isn't needed? Python

I’m currently writing some code, nothing special, but then i got this while trying to fix indents.

File "/data/data/com.termux/files/home/ttc2/main.py", line 67
return await asyncio.gather(*[self._check(sess, u) for u in self.to_check])
                                                        ^
IndentationError: expected an indented block after 'with' statement on line 66

Now, I’m confused where the indent is required, could anyone help?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Please post the code so we could help you, anywho

you should make an indentation after using with

with open(filename,mode) as w:
    w.write('hello')
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading