question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Integration problems with VSCode

See original GitHub issue

Bug report

What’s wrong

When a run the command flake8 . is everything okay but when I want to see the errors inside of VSCode I can’t see anything.

How is that should be

Show the errors in VSCode.

System information

flake8 information

Contents of flake8 --bug-report:

Traceback (most recent call last):
  File "/home/alexis/Documents/Development/Fondeadora/python-service-template/env/bin/flake8", line 11, in <module>
    sys.exit(main())
  File "/home/alexis/Documents/Development/Fondeadora/python-service-template/env/lib/python3.7/site-packages/flake8/main/cli.py", line 18, in main
    app.run(argv)
  File "/home/alexis/Documents/Development/Fondeadora/python-service-template/env/lib/python3.7/site-packages/flake8/main/application.py", line 393, in run
    self._run(argv)
  File "/home/alexis/Documents/Development/Fondeadora/python-service-template/env/lib/python3.7/site-packages/flake8/main/application.py", line 380, in _run
    self.initialize(argv)
  File "/home/alexis/Documents/Development/Fondeadora/python-service-template/env/lib/python3.7/site-packages/flake8/main/application.py", line 365, in initialize
    self.parse_configuration_and_cli(argv)
  File "/home/alexis/Documents/Development/Fondeadora/python-service-template/env/lib/python3.7/site-packages/flake8/main/application.py", line 218, in parse_configuration_and_cli
    self.option_manager, self.config_finder, argv
  File "/home/alexis/Documents/Development/Fondeadora/python-service-template/env/lib/python3.7/site-packages/flake8/options/aggregator.py", line 36, in aggregate_options
    original_values, _ = manager.parse_args(arglist)
  File "/home/alexis/Documents/Development/Fondeadora/python-service-template/env/lib/python3.7/site-packages/flake8/options/manager.py", line 313, in parse_args
    options, xargs = self.parser.parse_args(args, values)
  File "/usr/lib/python3.7/optparse.py", line 1387, in parse_args
    stop = self._process_args(largs, rargs, values)
  File "/usr/lib/python3.7/optparse.py", line 1427, in _process_args
    self._process_long_opt(rargs, values)
  File "/usr/lib/python3.7/optparse.py", line 1501, in _process_long_opt
    option.process(opt, value, values, self)
  File "/usr/lib/python3.7/optparse.py", line 785, in process
    self.action, self.dest, opt, value, values, parser)
  File "/usr/lib/python3.7/optparse.py", line 805, in take_action
    self.callback(self, opt, value, parser, *args, **kwargs)
  File "/home/alexis/Documents/Development/Fondeadora/python-service-template/env/lib/python3.7/site-packages/flake8/main/debug.py", line 37, in print_information
    print(json.dumps(information(option_manager), indent=2, sort_keys=True))
  File "/usr/lib/python3.7/json/__init__.py", line 238, in dumps
    **kw).encode(obj)
  File "/usr/lib/python3.7/json/encoder.py", line 201, in encode
    chunks = list(chunks)
  File "/usr/lib/python3.7/json/encoder.py", line 431, in _iterencode
    yield from _iterencode_dict(o, _current_indent_level)
  File "/usr/lib/python3.7/json/encoder.py", line 405, in _iterencode_dict
    yield from chunks
  File "/usr/lib/python3.7/json/encoder.py", line 325, in _iterencode_list
    yield from chunks
  File "/usr/lib/python3.7/json/encoder.py", line 405, in _iterencode_dict
    yield from chunks
  File "/usr/lib/python3.7/json/encoder.py", line 438, in _iterencode
    o = _default(o)
  File "/usr/lib/python3.7/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type cached_property is not JSON serializable

pip information

Contents of pip freeze:

aspy.yaml==1.3.0
astor==0.8.0
astroid==2.3.2
atomicwrites==1.3.0
attrs==19.3.0
autopep8==1.4.4
bandit==1.6.2
boto3==1.9.86
botocore==1.12.253
cached-property==1.5.1
cfgv==2.0.1
colorama==0.3.9
docutils==0.15.2
entrypoints==0.3
eradicate==1.0
flake8==3.7.9
flake8-annotations-complexity==0.0.2
flake8-bandit==2.1.2
flake8-broken-line==0.1.1
flake8-bugbear==19.8.0
flake8-builtins==1.4.1
flake8-coding==1.3.2
flake8-commas==2.0.0
flake8-comprehensions==2.3.0
flake8-debugger==3.2.0
flake8-docstrings==1.5.0
flake8-eradicate==0.2.3
flake8-executable==2.0.3
flake8-isort==2.7.0
flake8-logging-format==0.6.0
flake8-pep3101==1.2.1
flake8-polyfill==1.0.2
flake8-print==3.1.1
flake8-quotes==2.1.0
flake8-rst-docstrings==0.0.11
flake8-string-format==0.2.3
flakehell==0.3.0
gitdb2==2.0.6
GitPython==3.0.4
identify==1.4.7
importlib-metadata==0.23
isort==4.3.21
jmespath==0.9.4
lazy-object-proxy==1.4.3
mando==0.6.4
mccabe==0.6.1
more-itertools==7.2.0
mypy==0.740
mypy-extensions==0.4.3
nodeenv==1.3.3
packaging==19.2
pbr==5.4.3
pep8==1.7.1
pep8-naming==0.8.2
pkg-resources==0.0.0
pluggy==0.13.0
pre-commit==1.20.0
py==1.8.0
pycodestyle==2.5.0
pydocstyle==4.0.1
pyflakes==2.1.1
Pygments==2.4.2
pylint==2.4.3
pyparsing==2.4.2
pytest==5.2.2
python-dateutil==2.8.0
PyYAML==5.1.2
radon==2.4.0
restructuredtext-lint==1.3.0
s3transfer==0.1.13
six==1.12.0
smmap2==2.0.5
snowballstemmer==2.0.0
stevedore==1.31.0
termcolor==1.1.0
testfixtures==6.10.0
toml==0.10.0
typed-ast==1.4.0
typing-extensions==3.7.4.1
urllib3==1.25.6
virtualenv==16.7.7
wcwidth==0.1.7
wemake-python-styleguide==0.12.5
wrapt==1.11.2
zipp==0.6.0

.vscode/settings.json

{
  "python.pythonPath": "env/bin/python3.7",
  "python.linting.pylintEnabled": false,
  "python.linting.flake8Enabled": true,
  "python.formatting.provider": "autopep8"
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
sobolevncommented, Nov 4, 2019

Hi, thanks a lot for the report! It seems like a flake8/vscode issue. I am going to open this issue in the upstream repo. And report back.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot Terminal launch failures - Visual Studio Code
Some terminal launch failures may be due to your shell installation and are not specific to VS Code. The exit codes displayed come...
Read more >
pwsh shell integration issues on Windows #155315 - GitHub
Does this issue occur when all extensions are disabled?: Yes VS Code Version: 1.69.1 and 1.70.0-insider (1cd90cc) OS Version: Windows_NT x64 ...
Read more >
nRF connect with VS code integration problem - Nordic Q&A
Hi, There is an issue caused by the VS Code update. If you have updated your VS code recently, you may experience problems...
Read more >
LaTeX, Python, VS Code, and Simple Integrals! - YouTube
In this video I create a worksheet with #python where I write integral symbols using #LaTeX - I do this all in #...
Read more >
VSCode: "Shell Integration failed to activate" - Stack Overflow
The problem is - there are multiple JSON files... One in the Workspace/Project. ... the .vscode folder Another in C:\Users\<profile>\AppData\ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found