VS code cannot import local python modules

All of my project files in VS code suddenly gives an error saying that it cannot import modules (even tho the modules are local i.e same directory and they used to work pretty well before). The...

problems with working compile and multiprocessing at the same time

i work in VSCode and when I run this file: from multiprocessing import Process def mp_setup_and_run(processes_num, *args): processes = {} for i in range(processes_num): ...

Textfile saved in wrong encoding in VS Code (on Ubuntu) leading to unicode error

I'm working with Visual Studio Code under Lubuntu 18.04. The file encoding in VS Code is configured to be UTF-8, and the Python scripts have the encoding set to utf-8: #!/usr/bin/env python3 #...

VSCode Python with Git bash: After running program, tries to run Activate.ps1

I have the VSCode integrated terminal set to my Git bash, using this in settings.json: "terminal.integrated.automationShell.windows": "${env:LOCALAPPDATA}\\Programs\\Git\\bin\\bash.exe", I...

I have and error in my Python Discord bot - ClientConnectorCertificateError

I have an error trying to run my Python Discord bot. Here's my code: import discord client = discord.Client() @client.event async def on_ready(): print('We have logged in as...

VS Code: How to debug Flask app that uses Connexion?

I have faced a problem with starting a Flask app. I am trying to run the app in debug mode with Visual Studio Code but it doesn't run properly. Here is the main module code: import os import...

psycopg2 - ImportError: DLL load failed while importing _psycopg: The operating system cannot run %1

I installed psycopg2 using conda on Windows 10. https://anaconda.org/anaconda/psycopg2 I did it in a clean new conda environment (named wr). I then tried to run this sample app but I am getting...

How can I debug Python console_script command line apps with the VSCode debugger?

I've a Python package package_name which provides a command line application command-line-app-name as console_script: setup.py: setup( ... entry_points={"console_scripts":...

VSCode Debug Mode sometimes does not work due to a PyDev FileNotFoundError

I'm gonna be honest, I have no clue what I'm looking at here. Out of nowhere my Debug configuration in this VSCode project, a Discord bot, has been spitting out errors when I begin debugging. It...

PermissionError: [WinError 5] Access is denied. Visual studio 2019, debugging

Doing my first PY from https://docs.microsoft.com/en-us/visualstudio/python/tutorial-working-with-python-in-visual-studio-step-04-debugging?view=vs-2019. First attempt to debug gives this prolog,...

python selenium error message.(Windows WebAuthn API failed to load)

I can't figure out. where is the problem occur. chrome driver? or vscode? Windows PowerShell Copyright (C) 2014 Microsoft Corporation. All rights reserved. PS F:\python workspace> &...

Sudden Tensorflow / Keras Google Colab dependency problems `AttributeError: module 'tensorflow._api.v1.compat.v2' has no attribute '__internal__'`

I have running a machine learning model (Matterport's Mask R-CNN) in google colab for a couple of weeks. All of a sudden today I am unable to run any of my notebooks due to I think some kind of...

How to install ctypes module for python 3.7 to be used with VSCode debugger

I have multiple python interperters in my computer 3.7 and 3.8. When I debug using with python 3.8 I do not face any issues using VSCode. My VScode python debugger fails when trying to debug with...

No module named app , While running Flask app

I'm new to using flask, I tried to execute a basic flask app in Visual-Studio-code . but I'm getting, No Module named app My code is: from flask import Flask app =...

Error importing pyarrow in jupyter notebook after pip installation of pyarrow

I am having an issue importing pyarrow into my jupyter notebook. To give some context, I created a virtual environment named rc_env. I've uninstalled and reinstalled pyarrow quite a few times but...

How to install PyCaret in AWS Glue

How can I properly install PyCaret in AWS Glue? Methods I tried: --additional-python-modules and --python-modules-installer-option Python library path easy_install as described in...

Heroku: Compiled Slug Size is too large Python

I trying to deploy my app to heroku I have following deploying error transformers 4.8.2 requires huggingface-hub==0.0.12, but you'll have huggingface-hub 0.0.14 which is incompatible. ...

Cannot import installed packages in Jupyter Notebook using Miniforge Conda Environment on M1 Mac

I have a M1 Mac (Apple Silicon, ARM) and I followed the instructions given by Apple here to install Miniforge, create a conda environment called tf_env and install Tensorflow on it. I wanted to...

ImportError: Could not find the DLL(s) 'msvcp140.dll or msvcp140_1.dll'. Even when the files are located in the %PATH% directory

I receive the following error when importing tensorflow (base) PS C:\Users\Rostyslav\GIt\GNN-GCP> python run_model.py --train --save Traceback (most recent call last): File "run_model.py", line...

ModuleNotFound: dateutil.parser

Here's what I'm running into: (.venv) PS C:\Users\<redacted>\onedrive\dev\python\code\kb4> py kb4.py Traceback (most recent call last): File...

Cannot pip install mediapipe on Macos M1

Hello fellows I'm using mac air with M1 chip My env sets like (CV) san  ~/work/python  conda list # packages in environment at /Users/san/miniforge3/envs/CV: # # Name ...

VS-Code Python debugging - ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it

I wanted to debug my local Python code as usual in VS-Code on Windows 10 via pressing F5. This morning there was an update of VS-Code (current version 1.59.0), maybe the issue is related, even...

WinError 32, Python, file used by another process

I have a script that is searching through files in a folder for multiple functions, one of which is verifying if they are valid. If they are corrupt, it moves them to another location. When...

Tensorflow Object Detection Api M1 Macbook Conflict Error

Machine: MacBook Air M1 2020 OS: macOs BigSur 11.4 Python version of venv: Python 3.8.6 Tensorflow version: ATF Apple Tensorflow 0.1a3 Pip version: 21.2.4 I have installed Tensorflow from...

PyVista `add_volume`: Garbled Output & Slower than ParaView

Questions: Update 14-SEP-2021: Simplified problem even further to a smaller MRE. After some analysis, it doesn't seem Qt threading is the culprit, so corresponding Qt code was removed. pyvista...

Remote debugging with debugpy works from code but not from command line

I have a python binary (which is built using bazel but I don't think that's relevant) that I can run like this: $...

How to skip over an item in a list when using a for loop

I am trying to skip over this item in a list because it creates an exception. I used try and except as well as an if statement but its still not working rather its ignoring my if statement. if I...

heroku failing to process requirements.txt "because these package versions have conflicting dependencies."

I have deployed this project many times before successfully and have made no changes to the requirements.txt file located in the root directory of the project, however. Heroku will no longer...

Python: matplotlib.pyplot.show() is not showing the plot

import matplotlib.pyplot as plt plt.plot([1,2,3]) plt.show() input("Press enter to continue...") If I run the script above within VS Code, or even within command prompt, the plot canvas only...

Unable to run vscode's debugger with dockerized django project

Every time when I run a debugger there happen many things but not what I expect. I'm running a project with docker-compose up Checking the localhost if backend backend is okay. It's down. What's...