Questions tagged [import]
The general process of moving data from an external source into one's platform, program, or data set.
import
27,712
questions
0
votes
0
answers
8
views
Experiencing an error when trying to import from a diffrent directory
i am trying to import a function from another file
a/b/c.py
a/1/2.py
i wanted to import a funciton from c.py in 2.py
sys.path.insert(1, '/path/to/c/py/a/b/c')
from c import function1, function2
i ...
0
votes
0
answers
9
views
Netlify "serverless" functions on front end cannot import ... really anything
I am working on a project that is React front/Node back, but utilizing Netlify's "serverless" functions for deployment there. loginUser.cjs is used for "GET"ting users from the ...
0
votes
0
answers
22
views
Why Does this Failed Import Cause Future Imports to Also Fail (which otherwise wouldn't)?
This question is really just about the "why." I'm not actually interested in a work-around. I just want to understand why this doesn't work as is.
IMPORTANT EDIT: apparently the issue ...
0
votes
1
answer
21
views
Azure DevOps: Link Test case to User Story during bulk import
While conducting a bulk upload of test cases to Azure DevOps, I want each test case to be linked to an existing User Story with Link Type of Tested By.
Is this possible?
-1
votes
0
answers
26
views
Work with updated value of a variable in a exported file in Javascript
A variable at the beggining of a file is empty, that variable is imported in another file. In the program the variable is modified in source file and I need the updated version in the exported file, ...
0
votes
0
answers
15
views
How to fix error "ModuleNotFoundError: No module named 'imp'" when I use "from pyDOE2 import fullfact"?
I need to import “fullfact” from “pyDOE2”. But I faced with the following error: “ModuleNotFoundError: No module named 'imp'”.
Phyton version: 3.12.4
I appreciate if anyone can help me.
0
votes
0
answers
16
views
Importing a Local Module from a Different Directory in Python 3
I have seen this question asked in numerous other posts, but none of the answers seem to work for my situation using Python 3. I have a simple repository I am working in; call it my workspace, named ...
0
votes
0
answers
11
views
Typescript import cannot resolve path to node_module
I am working on a typescript project, trying to import 'path'.
It's for a Figma plug-in so I followed their getting started guide (https://www.figma.com/plugin-docs/libraries-and-bundling/#bundling-...
-1
votes
1
answer
34
views
ImportError: cannot import name '' from '' (unknown location)
This is my folder structure
folder structure
I want to import formatting into my jupyter notebook, main.ipynb.I have tried from src.processing import formatting
However, when I try the import, I get ...
0
votes
1
answer
42
views
Why is `__name__` of `__init__` different when importing directly?
I have a directory structure like this:
.
├── main.py
└── silly_test
├── __init__.py
└── foo.py
# main.py
import silly_test.foo
import silly_test.__init__ # This line is unusual - I wouldn't ...
0
votes
2
answers
56
views
Javascript: How do I import and export async functions?
I am creating a weather app using front end only (HTML, CSS, and JavaScript) using NWS (National Weather Service) API, Google JavaScript Library API, Google Places API, and Google Geocoding API. I ...
0
votes
0
answers
17
views
Can't import createApp from "vue"
So I've written the very basic App.vue file:
import { createApp } from "vue"
import App from "./App.vue"
createApp(App).mount("#app")
and it logs the error
Uncaught ...
0
votes
0
answers
12
views
Qt Tool qmllint not working on imported C++ modules
I want to use qmllint on my Main.qml, which uses modules exposed from C++ side, such as the mainCtrls import and the mainControls keyword:
import QtQuick 2.15
import QtQuick.Controls 2.15
import ...
1
vote
1
answer
46
views
Can't we import 'pyautogui' into google colaboratory?
I'm new to python and I have some issues importing a few modules on google colaboratory which include gui.
After giving the command :
!pip install pyautogui,
colab installs it without any error but ...
0
votes
0
answers
27
views
Permission denied when importing matplotlib.pyplot in jupyter notebook
I get the Permission denied while I type "import matplotlib.pyplot as plt" in the jupyter notebook.
Once I type "import matplotlib.pyplot as plt" and run it,
the return message is ...
0
votes
0
answers
33
views
How to create button from file excel "Master file" import data from the another excel "File input"
When others write into the "input file" that I send to another person's computer, when they write their information, that information will be saved in the ''Master file''.
I want to get the ...
1
vote
0
answers
29
views
Is there an option in vite.config.ts to include all types in index.d.ts when building with Vite bundler?
I published a custom hook package using Vite bundler, but in the dist folder, the index.d.ts does not contain type declarations for functions, causing errors when trying to import types.
The file ...
0
votes
0
answers
37
views
How to resolve cx_Freeze error about pdf2docx mupdf import?
I've never posted here before, but this time I'm genuinely stuck. I'm using cx_Freeze on a python script that uses pdf2docx. Running the python script normally works fine, but running cx_Freeze's ...
0
votes
1
answer
19
views
Moving Wordpress Custom Field Value into Default Editor/Excerpt
I am in the process of migrating posts between an old and a new website. ACF was used on the old website and when I import the posts into the new website it creates the custom fields "...
0
votes
0
answers
21
views
SAS IMPORT TABLE
I'm trying to import a file that have 833 lines but when I import it on SAS only appear 11 lines.
data shops;
length name$64 straat$64 pc6$8 plaats$32 pc4$8 Keten$32 Formule$32 niv1_ddms$8 ...
0
votes
0
answers
26
views
Julia - Quickly import method from package in module
In Julia, I want to use the Optimizer method from Gurobi in a module which I then use in a Julia script. Importing this method (either with the line using Gurobi: Optimizer or import Gurobi: Optimizer)...
0
votes
1
answer
16
views
WordPress bulk media import using CLI - how to retain folder structure?
I'm trying to upload or register (the files are in the Upload directory via FTP) around 2000 media files. These are organised by month and year.
Although I've not had any luck with the usual plugins ...
0
votes
0
answers
27
views
I'm facing the error[E0432]: unresolved import ; no external crate, but I'm following exact instructions [duplicate]
I'm trying to recreate a Turing Machine Simulator using WASM + React just for fun and to learn a bit about WebAssembly and front-end. As I wasn't very interested in the actual TM details, I decided to ...
0
votes
0
answers
14
views
Using SwiftUI to "import", not "Add" an iCloud shortcut that has setup steps [closed]
I can "import" my shared iCloud Shortcut that contains setup questions for the user in a clickable link in a mail message, but when I try to do that using the same clickable link in a ...
0
votes
1
answer
34
views
Can't import one of the classes in a python file [closed]
I'm working on a adjusted version of the neat-python library for a project. When trying to add a new reporter class to the reporter file, I can't import a class from the file, even though I can import ...
0
votes
1
answer
40
views
Unresolved reference: json
When I build a kotlin project with cradle, I cannot use import org.json.JSONObject, and the json package is not in my library. How can I import it?
import org.json.JSONObject
I use kotlin with gradle....
0
votes
1
answer
22
views
I'm having problems with importing next/image and next/link
None of my next/ imports are working. I currently am using Next.js v14.2.4 and Node v18.17.0. On my "/app/page.tsx", I have these two imports:
import Image from 'next/image';
import Link ...
0
votes
0
answers
38
views
SQL Server Import wizard 64 bit error with truncation
I'm importing a 4.5 million row file from a SQL Server to another one for further analysis. The process stops every time there's a truncation error.
I use Notepad++ to go to the row and see where the ...
0
votes
0
answers
33
views
I'm trying to import csv data into a Django model. The import is failing due to data types
I'm using the Django import,export module in the admin panel.
The import field in question is a CHAR field. The csv field in question can contain numbers or numbers and letters. If an entry contains ...
-1
votes
1
answer
27
views
Import function from package file
My project structure is as follows:
package/
module/
__init__.py
component.py
main.py
script.py
In main.py I have: from module.component import something.
And in script.py I ...
0
votes
0
answers
24
views
import.meta.env is undefined in a React App built with Vite. I'm unable to use environment variables [closed]
I've scoured the internet for solutions but I can't seem to find any. Here's the error I'm encountering.
TypeError: Cannot read properties of undefined (reading 'VITE_BACKEND_URL')
I can't access ...
0
votes
1
answer
25
views
Organizing an Azure ML project with multiple step scripts and shared modules
Starting Point
I am setting up a codebase for an Azure ML with Python project. The project has a main.py script that builds the pipeline and triggers its execution on Azure. The pipeline consists of ...
0
votes
1
answer
38
views
Import of github.com/Ullaakut/nmap fails with "missing metadata for import"/"import cycle not allowed"
I use Windows 11 and could not import github.com/Ullaakut/nmap (missing metadata for import of "github.com/Ullaakut/nmap")
I try to import github.com/Ullaakut/nmap with:
package main
import ...
0
votes
0
answers
37
views
How to import in place vhdx WSL2 from a NAS with User credentials
I currently have a .vhdx file on my NAS of a distribution and I would like to be able to import and run the distribute from the NAS. Where I am currently at:
In PowerShell (administrator mode)
I have ...
0
votes
0
answers
10
views
Ignore \0 entries in MySQL LOAD DATA statement
I regularly import CSV files into MySQL and sometimes the program that creates them has a random number of '\0' characters in the last line. I'd like to ignore this line when it occurs. Is there a way ...
2
votes
0
answers
48
views
RecursionError when importing libraries in Jupyter Notebook
I installed Jupyter Notebook on my new computer. When I am trying to import python libraries, some raise no errors, and others (known libraries that I have worked with before) raise a recursion error ...
-1
votes
1
answer
45
views
Cannot import go-gl library - "build constraints exclude all Go files"
I'm very new to golang, sorry if this is obvious. I've followed the steps from the project Github, and here is my exact procedure (with error):
$ go mod init mydomain.com/test
$ go mod tidy
$ go get -...
-1
votes
0
answers
22
views
Why does ipdb make an unexplained error disappear?
I have a script that imports a module located in the plugins folder. When I run my script, I get the ModuleNotFoundError error (note that I use import) even though the module exists and I can import ...
0
votes
0
answers
16
views
TypeScript project can't find UMD module during import
I created a library of React components built with TypeScript and compiled into UMD using Webpack. When I try to import one of those components into a separate TypeScript project, I get the following ...
-2
votes
1
answer
27
views
Tensorflow.keras is not working, what should I do?
I installed Tensorflow on my computer but I cant get the line: "from tensorflow.keras import..." to work. I tried it on a different computer, I have tensorflow installed using pip: py -m pip ...
-1
votes
0
answers
33
views
error: package org.knowm.chart does not exist
I need to import xchart into Visual Studio Code for a project. I've configured the classpath, modified the settings.json file, and also added the .jar files to Referenced Libraries, but I'm still ...
0
votes
0
answers
18
views
Err: The requested module 'redux-thunk' does not provide an export named 'default' [duplicate]
I am currently learning redux and encountered an issue with importing redux-thunk in my Node.js project. I’m trying to set up middleware for my Redux store, but when I attempt to import redux-thunk, I ...
0
votes
2
answers
45
views
Importing Python modules from a subdirectory
How can i import my module lib.py in my script module1.py from the following directory structure?
|-
|-lib/lib.py
|-module1/module1.py
1
vote
0
answers
27
views
Received Import Error while importing an existing function
I have a library installed from google and I was trying to import a function from it yet it says that the function cannot be imported.
The error is as follows:
ImportError: cannot import name '...
0
votes
1
answer
18
views
After adding IronPython through NuGet in Jetbrains Rider and launching Unity package cannot be seen neither by Unity nor by Rider
I added IronPython package trough NuGet in Rider. Everything worked fine, however after launching Unity .csproj changes and packages are removed from there. So compile errors appear. How to add ...
0
votes
0
answers
14
views
python import: automatically add work folder path to sys.path
I note a strange performance when using relative import in python. Here is a example:
Directory structure in D:\tmp\:
example
--level_1_a
----a1.py
--level_1_b
----b1.py
Here are the contents in each ...
0
votes
1
answer
22
views
How to import custom files in the same folder as main.py
Suppose I have:
Project_root (folder)
source (folder)
main.py
functions(folder)
test.py
__init__.py (empty)
Here is the code in main.py:
import os
import sys
from source....
-2
votes
0
answers
19
views
I'm trying to create a CRUD application in Go, but I'm encountering many errors. Can anyone help me understand why this is happening? [duplicate]
`
error when i run main.go
[Running] go run "d:\Folder ku\BELAJAR\GOLANG\prakerja-golang\sesi6\TPM6\main.go"
sesi6\TPM6\main.go:8:2: "./handler" is relative, but relative import ...
0
votes
0
answers
36
views
Issues Importing Excel Data with BelongsTo Relationship in Filament
I am trying to import data from an Excel file into my laravel Filament (V3) application , but I'm having trouble with importing relationships. Specifically, I have a Stock model that has a belongsTo ...
0
votes
1
answer
12
views
How to import data into PieCloudDB faster
I'm using python to write data from pandas dataframe to my PieCloudDB database, but the import using the following method is particularly slow:
def insert_rows(rows:pd.DataFrame,table="...