Questions tagged [importerror]
Refers to errors that result from attempting to import a module or library into one's code
3,022
questions
0
votes
1
answer
18
views
MS SQL Hook and Operators not importing into Airflow
Trying to import the mssql hook and operator into my dag but I keep getting this error from Airflow.
I'm currently importing with the newest syntax:
from airflow.providers.microsoft.mssql.hooks.mssql ...
0
votes
1
answer
22
views
How to import javascript libraries using Parcel/Netlify?
I'm building a vanilla js app and using CDN's works fine, but If I install an app like typed.js with npm, and then import it as import typed from 'typed.js' it works as it should on a local dev server....
0
votes
0
answers
24
views
Python package is missed for machine learning and neural networks on windows 10_64bit Enterprise LTSC
I’m running a neural network code downloaded from github (https://github.com/okada39/pinn_wave) that solves the 1D wave equation via PINNs algorithm.
After running my executed neural network code.py ...
0
votes
0
answers
13
views
ImportError: cannot import name 'List' from 'torchvision.transforms'
from torchvision.transforms import InterpolationMode, List, Tensor
ImportError: cannot import name 'List' from 'torchvision.transforms'
here is my code and error .torchvision:0.10.0+cu111
-1
votes
1
answer
23
views
Legion won't open in Kali linux [closed]
I installed legion on one kali Linux machine using apt-get install legion and it worked just fine. However, I tried this again on a new machine and I get this error every time I try starting it.
...
1
vote
1
answer
46
views
Python3 import error smart_unicode django
This is my first time ever trying to run a py script
I have a script to auto import to android studio some translations. I installed python 3.10.5 and pip and trying to run a script. I also installed ...
0
votes
0
answers
24
views
Error message occurs when using Python in VS Code
I'm quite new to coding with Python. Until now I always coded in Jupyter Notebooks for data analysis purposes (This worked very well). Now I would like to build a financial dashboard and code this in ...
0
votes
0
answers
7
views
Import doesn't work the first time, works on second attempt
Image showing the error
Title is pretty self explanatory, why is this happening and how can I fix it?
-2
votes
1
answer
23
views
ModuleNotFoundError: No module named 'pya2ldb' [closed]
when I try to import the library pya2l for a2l parsing this error occors.
ModuleNotFoundError Traceback (most recent call last)
Input In [21], in <cell line: 1>()
----> ...
0
votes
1
answer
31
views
Adding c.py to simple project results in "ModuleNotFoundError: No module named c"
Not exactly a newbie but not an expert either, obviously. Could not find this problem elsewhere.
This is a simple layout created with Atom, and it used to work just fine from the terminal, but no more,...
0
votes
0
answers
7
views
cannot import name 'trace' from 'tensorflow.python.profiler
My enviorment was working fine, getting back to it after a while and when I try to run tensorboard I face this error:
cannot import name 'trace' from 'tensorflow.python.profiler
I have these ...
0
votes
0
answers
13
views
mendeley web importer Chrome 3rd party cookie error
when i'm use Mendeley Web Importer, i get 3rd cokkie error. But i dont get same error in firefox.
What reason this error?
enter image description here
my site link is https://dergipark.org.tr/tr/pub/...
0
votes
1
answer
49
views
ImportError: I have made __init__.py file as well
I am having this error while I run the project:
from .miner import Miner
ImportError: attempted relative import with no known parent package
1--> init file, 2--> malicious miner.py which shoes ...
-1
votes
0
answers
21
views
ImportError: pycurl: libcurl link-time version (7.68.0) is older than compile-time version (7.78.0)
enter image description here
I can't solve this problem in my virtual environment
0
votes
0
answers
18
views
Can't resolve 'react-image-video-lightbox'
This is my first question on StackOverflow. So might miss out on detailing, so please correct me if needed.
I am facing an issue with one of my imports in reactJs. The package react-image-video-...
0
votes
0
answers
33
views
How do you import a class from another folder? + ImportError: attempted relative import with no known parent package
I have the following folder structure
parent Folder
├── __init__.py
├── app_folder
│ └── file_1.py
│ └── __init__.py
└── Model_Folder
└── model.py
└── __init__.py.py
I have a ...
0
votes
0
answers
26
views
Can't import hdf file on Mathematica 13.0
Keep getting the error "Import: Could not allocate memory for import of HDF format"
The notebook I am using was working fine without any errors on a desktop computer, but when I try to use ...
0
votes
0
answers
36
views
scipy.stats ImportError: cannot import name 'alexandergovern'
I am trying to apply scipy's Alexander Govern test:
import pandas as pd
import scipy.stats
df1 = pd.read_csv(r'Data1.tsv', sep='\t', encoding='utf-8')
df2 = pd.read_csv(r'Data2.tsv', sep='\t', ...
0
votes
1
answer
21
views
Why do I keep receiving ModuleNotFound error with pydot, despite having installed it?
I've installed pydot and checked to make sure of this several times. However, when I attempt to import it in a Juptyer notebook file, I keep receiving a Module Not Found error:
ModuleNotFoundError: No ...
-1
votes
0
answers
21
views
How do I import module_locator?
How do I import module_locator? I'm learning python by copying code, and I've been able to resolve all other dependencies, but I can't figure out this module_locator. I've tried to add it as a package ...
0
votes
2
answers
35
views
Import Error building an executable with py2exe
I program a software that connects with a mqtt broker and displays windows10 notifications using win10toaster among others.
I wanted to create an executable with py2exe but when I run the .exe I get ...
0
votes
1
answer
24
views
ImportError: cannot import name 'path' from 'django'
I am trying to learn django/make my first web app with the platform.
I am trying to set up my first url page, but the path import won't work (Import Error). The import code I used (which is pretty ...
0
votes
1
answer
39
views
Python 3.9 in Statsmodel ImportError: cannot import name 'Literal' from 'statsmodels.compat.python'
I cannot manage to import ARIMA model from statsmodels without encountering this error:
This is how the import is:
from statsmodels.tsa.arima.model import ARIMA
This is the error:
ImportError: cannot ...
1
vote
0
answers
15
views
Python: how to import func from the nested subdir
I have a project with the following structure
app
├── app
│ └─- __init__.py
│ └── file.py
└── notebooks
└── notebook.ipynb
I try to import func inside notebook.ipynb
I use from app.file ...
1
vote
2
answers
38
views
Why is mechanize not installing properly via pip on RPi? (python 3.9)
I can't get to successfully install the package 'mechanize' on a Raspberry Pi (so, ARM chip) with Debian Bullseye, python 3.9 in a virtualenv.
When I look in the virtualenv's sitepackages folder, ...
0
votes
1
answer
61
views
How to resolve this Mediapipe TypeError?
Exception has occurred: TypeError
Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0....
0
votes
0
answers
12
views
No module named 'facebook' [duplicate]
I tried to install the facebook modules using:
pip install facebook-sdk
pip install python-facebook-api
The result for facebook-sdk was:
Requirement already satisfied: facebook-sdk in c:\users\rotci\...
0
votes
0
answers
24
views
Python: why I can a script on Spyder/ Pycharm but can't run the same script on python IDLE shell
The problem happens when I'm importing some libs. Let's say I have to import numpy. When I import on Spyder or any other IDLE my code works just fine. But for this project I have to use Python Shell ...
-2
votes
0
answers
24
views
Javascript: Neither Require nor Import can be used
My Node version is v16.15.0, and I am trying to learn the opensea-js sdk, see https://github.com/ProjectOpenSea/opensea-js
In the part 1 of Getting Started, If I use "import", I get
Uncaught ...
0
votes
1
answer
29
views
Import statements not working / I think I broke Python / file structure issues?
[I am new to Python (and programming in general) and will definitely say something stupid in this question.]
I had two python programs. In one of them the import statements were working. And in the ...
0
votes
0
answers
23
views
cannot import name 'mss' from partially initialized module 'mss' (most likely due to a circular import)
mss library bug, I was trying most simple Example Program.
I have reinstall that library but still same error.
from mss import mss
with mss() as sct:
sct.shot()
And that's what I got.
0
votes
1
answer
13
views
IEEE Xplore's Python Software Development Kit returns ImportError: cannot import name 'soft_unicode' from 'markupsafe'
I am working on a Plagiarism Detector using Python and NLP and I wanted to build the training set dynamically. Hence I am trying to use the IEEE Xplore's Python Software Development Kit to gather some ...
0
votes
0
answers
93
views
Tensorflow & Node: ...server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec
I am currently trying to follow along to a tutorial using tensorflow & js to make a handwriting detection AI, but am having some trouble with imports. Previously, I wasn't able to import the ...
-1
votes
0
answers
18
views
Importing Seaborn doens't work in Jupyter notebook after reinstall
I have a problem importing seaborn in jupyter. I tried to reinstall it via jupyter notebook/conda prompt, and it still doesn't work. I am running out of ideas about what is going on. Does anybody face ...
0
votes
2
answers
21
views
How can I fix a very basic ImportError in Python3?
Similar to ImportError: Cannot import name X, I have a main.py file and, in the same folder, a few other python files bill.py and flatmate.py.
bill.py and flatmate.py each contain classes, nothing ...
2
votes
1
answer
65
views
ts-node 'MODULE_NOT_FOUND' when using absolute imports in TypeScript
I stumbled upon a problem with absolute imports. The repository is publicly available here: https://github.com/repetitioestmaterstudiorum/ts-boiler
When I'm trying to import a file with absolute path (...
0
votes
0
answers
74
views
PythonOCC 'ImportError: DLL load failed while importing _Aspect: The specified module could not be found'
I'm trying to use the PythonOCC module.
I've installed it succesfully using Anaconda.
Now to test it i'm running a script which contains:
from OCC.Display.SimpleGui import init_display
from OCC.Core....
1
vote
1
answer
47
views
Python imports without "from"
I have a project with the following directory structure:
dir1
--dir2
----file1.py
----file2.py
--file3.py
In file3, I call a function in file1. In file1, it calls a function in file2, so it imports ...
-1
votes
2
answers
20
views
Why PIL is not working on miniconda python 3.9?
from PIL import image
ImportError: cannot import name 'image' from 'PIL' (<path>9/lib/python3.9/site-packages/PIL/__init__.py)
pip install, conda install all tested.
May anyone experienced same ...
1
vote
1
answer
55
views
Pytest "No module named..." issue
So I'm running into issues when I run pytest versus when I invoke the tested module directly. Pytest actually runs fine but I run into issues trying to directly invoke the python file that I'm testing....
0
votes
1
answer
48
views
pytables ImportError: DLL load failed while importing utilsextension
My code contains the line from tables import NaturalNameWarning which causes the following error:
from tables import NaturalNameWarning
Traceback (most recent call last):
Input In [4] in <cell ...
0
votes
0
answers
30
views
1231 - Variable 'character_set_client' can't be set to the value of 'NULL'
I was importing Zip file containing multiple .sql file
during import its give me following error
1231 - Variable 'character_set_client' can't be set to the value of 'NULL'
Someone already posted ...
1
vote
1
answer
95
views
Exception has occurred: ImportError "No module named 'numpy.core._multiarray_umath'"
WHAT I'M DOING:
I'm trying to import numpy:
import numpy
but I'm getting the following error:
Exception has occurred: ImportError
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
...
-3
votes
0
answers
19
views
Cannot find symbol class BR? I am creating a app that uses ROOM but when I try to run it, it gives me this error
this is the code that the error is in.
these are the packages I have imported: androix.databinding.library.baseAdapters.BR
The error:
Cannot find symbol import androidx.databinding.library....
2
votes
2
answers
62
views
Sklearn - StratifiedGroupKFold cannot be imported in JupyterNotebook Browser
I have been having issues importing StratifiedGroupKFold using JupyterNotebook.
from sklearn.model_selection import StratifiedGroupKFold
ImportError: cannot import name 'StratifiedGroupKFold' from '...
0
votes
0
answers
13
views
Import cython submodule: ModuleNotFoundError
My project structure is like this. I have a cython file compiled inside the folder ./pis. It's compiled normally.
project-folder/
├── test/
| tqix/
| ├── pis/
│ | ├── accumulated_state.c
│ | ...
0
votes
1
answer
32
views
Unresolved reference: antlr
When I am importing antlr, as in below
import org.antlr.v4.runtime.*
...
I get the error message saying Unresolved reference: antlr.
Not quite sure if you need this info, but my build.gradle is ...
0
votes
0
answers
62
views
No module named 'imutils' when installed
I know there have been a lot of questions and answers on this matter, but I've tried every method and none seem to work. I'm using anaconda on windows 10-11. I did pip install imutils and it said
...
1
vote
0
answers
41
views
py2exe (version 0.11.1.0) not able to import wx files in dist folder
I am using Python 3.8 and wxpython 4.1.1. My python script is working fine in windows 10 64bit PC. However, when I am trying to convert the python script using py2exe, although it is able to produce ...
0
votes
0
answers
56
views
how to import image in js in vscode by using import keyword
I am trying to import image in JS file like this
import image from "./image/bg.png"
and in the script tag
<script type="module" src="./index.js"></script>
...