VSCode Pylance can't find import - visual-studio-code

I'm using Django.
The issue happens when I import a module I defined like so import project.helpers.
If I import project.helpers as helpers it works fine.
Any solutions to this?

Related

import name 'Mapping' from 'collections'

I have installed yfinance, but when i try to import it, it gives me the error: cannot import name 'Mapping' from 'collections'. I tried writing on jupyter notebook from collections.abs import Mappings, but it didn't work. I tried to look at the file init.py, but there is no: from collection import mapping, there is only import _collections_abc, and from _collections import deque.
Please help if someone has a solution?My python version is 3.10.5

VSCode dart code auto completion doesn't work properly for packages

I use VSCode for flutter development everything is good but autocompletion is not working properly for packages.I wonder what is wrong with my IDE settings
If I import packages without as keyword the code completion doesn't work but if I import them as something it works for example if I import like following :
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:http/http.dart'
The intellisense doesn't recognize FireStore and http but if I import like:
import 'package:cloud_firestore/cloud_firestore.dart' as fire;
import 'package:http/http.dart' as http;
now when I call fire It shows firestore class and methods and same is for http and every other package
Since you're not getting auto-suggestions, please check these guidelines
Please ensure, you have included your package in pubspec.yaml
Did you executed flutter pub get
Usually, we can use Ctrl+Space to get auto-suggestion on VSCode

import statsmodels package returns ModuleNotFound despite correct path

I am trying to import statsmodels.stats.weightstats.DescrStatsW.tconfint_mean.
I run
from statsmodels.stats.weightstats.DescrStatsW import tconfint_mean
I get the error
ModuleNotFoundError: No module named
'statsmodels.stats.weightstats.DescrStatsW';
'statsmodels.stats.weightstats' is not a package
I have confirmed that I can import other packages from statsmodels with no problems.
I must be using the wrong path, but the docs don't specify any other path to use.
I just figured it out. I will leave this up for progeny.
from statsmodels.stats.weightstats import DescrStatsW
DescrStatsW.tconfint_mean(...)
Not sure why this behaves differently from other python libraries.

The import com.interwoven cannot be resolved

I am new to Teamsite and a not sure which jar file to use for resolving the issue that I get while trying to write a Java Datasource in Eclipse.
The list of imports I am using are:
import com.interwoven.datasource.MapDataSource;
import com.interwoven.datasource.core.DataSourceContext;
import com.interwoven.livesite.dom4j.Dom4jUtils;
import com.interwoven.serverutils100.InstalledLocations;
import com.interwoven.cssdk.filesys.CSVPath;
All these imports show the same error
The import com.interwoven cannot be resolved.
Can anyone please tell me which jar files should I add?

Issue with importing scipy.integrate or scipy.integrate.quad

This might be something really simple: I am using Python 2.6.5 and I am unable to load any integration module in my working space. Everything is OK when I import scipy, but if I try to import scipy.integrate or scipy.integrate.quad I get an error message from python. Any clue?? Thanks.
Try from scipy import integrate.