-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug with flake8 #31
Comments
Similar situation here. The following code is fine. %%flake8
from colorama import init, Fore
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.edge.service import Service
from selenium.webdriver.remote.webelement import WebElement
from selenium.webdriver.support.ui import WebDriverWait But with the addition of one line of comment: %%flake8
from colorama import init, Fore
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.edge.service import Service
from selenium.webdriver.remote.webelement import WebElement
from selenium.webdriver.support.ui import WebDriverWait
#from selenium.common.exceptions import NoSuchElementException, ElementClickInterceptedException An AttributeError is raised. AttributeError: '_io.StringIO' object has no attribute 'buffer' If Installed packages (sorted by relevance in my opinion):
Please look into the issue. Thank you. |
The following is a rough traceback (the code is run on my work computer and I have to retype it here): Input in [2], <module>
----> 1 get_ipython.run_cell_magic('flake8', '', ...)
File ~\...\site-packages\IPython\core\interactiveshell.py:2257, in InteractiveShell.run_cell_magic(self, magic_name, line, cell)
-> 2257 result = fn(*args, **kwargs)
File ~\...\site-packages\pycodestyle_magic.py:218, in flake8(line, cell, auto)
-> 218 _ = flake.check_files([f.name])
File ~\...\site-packages\flake8\api\legacy.py:110, in StyleGuide.check_files(self, paths)
-> 110 self._application.report_errors()
File ~\...\site-packages\flake8\main\application.py:309, in Application.report_errors(self)
-> 309 results = self.file_checker_manager.report()
File ~\...\site-packages\flake8\checker.py:249, in Manager.report(self)
-> 249 results_reported += self._handle_results(filename, results)
File ~\...\site-packages\flake8\checker.py:155, in Manager._handle_results(self, filename, results)
-> 155 reported_results_count += style_guide.handle_error(...)
File ~\...\site-packages\flake8\style_guide.py:429, in StyleGuideManager.handle_error(self, ...)
-> 429 return guide.handle_error(...)
File ~\...\site-packages\flake8\style_guide.py:581, in StyleGuide.handle_error(self, ...)
-> 581 self.formatter.handle(error)
File ~\...\site-packages\flake8\formatting\base.py:100, in BaseFormatter.handle(self, error)
-> 100 self.write(line, source)
File ~\...\site-packages\flake8\formatting\base.py:203, in BaseFormatter.write(self, line, source)
-> 203 self._write(line)
File ~\...\site-packages\flake8\formatting\base.py:187, in BaseFormatter._write(self, output)
-> 187 sys.stdout.buffer.write(output.encode() + self.newline.encode())
AttributeError: '_io.StringIO' object has no attribute 'buffer' |
I installed |
Related issue on flake8 - I think the magic needs updating to address this: PyCQA/flake8#1419 |
I have a bug when trying to use flake8.
Here is my code:
When doing that, I have this error:
Technical details:
Is there a bug or something like that?
The text was updated successfully, but these errors were encountered: