mikeizbicki / cmc-csci046

CMC's Data Structures and Algorithms Course Materials
54 stars 154 forks source link

Error When Running Flake8 #381

Closed jp-walker closed 1 year ago

jp-walker commented 1 year ago

Attempting to run flake8 on ../continuous-integration/Fixme.py with both commands

$ flake8 Fixme.py

and

$ flake8

which return this block of text:

  File "/usr/bin/flake8", line 11, in <module>
    load_entry_point('flake8==3.5.0', 'console_scripts', 'flake8')()
  File "/usr/lib/python3/dist-packages/flake8/main/cli.py", line 16, in main
    app.run(argv)
  File "/usr/lib/python3/dist-packages/flake8/main/application.py", line 396, in run
    self._run(argv)
  File "/usr/lib/python3/dist-packages/flake8/main/application.py", line 383, in _run
    self.initialize(argv)
  File "/usr/lib/python3/dist-packages/flake8/main/application.py", line 371, in initialize
    self.make_file_checker_manager()
  File "/usr/lib/python3/dist-packages/flake8/main/application.py", line 293, in make_file_checker_manager
    checker_plugins=self.check_plugins,
  File "/usr/lib/python3/dist-packages/flake8/checker.py", line 89, in __init__
    self.pool = multiprocessing.Pool(self.jobs, _pool_init)
  File "/usr/lib/python3.6/multiprocessing/context.py", line 119, in Pool
    context=self.get_context())
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 174, in __init__
    self._repopulate_pool()
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 239, in _repopulate_pool
    w.start()
  File "/usr/lib/python3.6/multiprocessing/process.py", line 105, in start
    self._popen = self._Popen(self)
  File "/usr/lib/python3.6/multiprocessing/context.py", line 277, in _Popen
    return Popen(process_obj)
  File "/usr/lib/python3.6/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
  File "/usr/lib/python3.6/multiprocessing/popen_fork.py", line 66, in _launch
    self.pid = os.fork()
BlockingIOError: [Errno 11] Resource temporarily unavailable

I scoured google, restarted my computer, and restarted the lambda server multiple times and still couldn't figure out what was happening. Thanks!

jbecker7 commented 1 year ago

@jp-walker

I had the same issue and was able to solve it with

$ flake8 -j1 Fixme.py

Shoutout to @finnless for the fix!

mikeizbicki commented 1 year ago

@jp-walker and @jbecker7: These are both overall a great question/answer exchange. But in the future, anytime you are including a prompt like $ in a code snippet, that's a sign that you want the triple backticks instead of the single backticks. So, for example,

$ flak8 -j1 Fixme.py

would be better as

$ flake -j1 Fixme.py
jp-walker commented 1 year ago

@mikeizbicki I just double checked and I used the triple backticks for that section. Is there something else I can change? Thanks!

mikeizbicki commented 1 year ago

@jp-walker Both of your commands that start with a $ are still using inline code instead of code blocks. Only the error message is in a code block.