Questions tagged [import]
The general process of moving data from an external source into one's platform, program, or data set.
27,451
questions
0
votes
0
answers
6
views
Reference to dynamic, lazy script import in JavaScript
Do i need to create a reference to a dynamic, lazy import that is used multiple times in my script? Let's assume i have 2 event handlers that import a different function from the same module:
/* index....
0
votes
0
answers
7
views
Google sheets yahoo finance import xml formula
=IMPORTXML(CONCATENATE("https://finance.yahoo.com/quote/", index(A2)),"/html/body/div[1]/div/div/div[1]/div/div[3]/div[1]/div/div[1]/div/div/div/div[2]/div[2]/table/tbody/tr[6]/td[1]&...
-2
votes
0
answers
26
views
Python Program for Sorting a List of Strings Based on the Length of Each String
I'm working on a Python program to sort a list of strings based on the length of each string. The program should take a list of strings as input and return a new list with strings sorted in ascending ...
0
votes
1
answer
22
views
Java Program for Finding Prime Numbers in a Given Range:
I'm working on a Java program to find all prime numbers within a given range. The program should take two integers as input (start and end) and print the prime numbers in that range. Here's what I ...
0
votes
3
answers
67
views
How can I use global variables from functions between modules in python?
file1.py: (I declare a variable x in function)
def function1():
global x
x = 10
main.py: (I try to use x variable, because I supposed that it is in global scope)
from file1 import *
print(x)
...
0
votes
0
answers
13
views
How do I modularize javascript files in a chrome extension? [duplicate]
I previously did not import functions into scripts in my chrome extensions, but I ran into a problem when redeclaring the function when I ran the script multiple times. However, now I am unable to ...
0
votes
0
answers
13
views
Import module from package
Case:
In project I have package (pack) and those init file.
Also in main project dir have 2 .py files (f1 and f2).
In pack I have f3.py file (inside importing, for example, numpy lib)
Faced with next ...
-2
votes
0
answers
44
views
Trying to read data out of a Json file using Java
I'm trying to read some data out of a json file which has three parameters. I have an issue with the import of the jackson library. I'm using vscode. In the downloaded file I'm also unable to find a ...
0
votes
0
answers
9
views
how to Insert Store_Id in the products table while importing the product .csv file
I am working on medusajs E-commerce project where we have to import the bulk products with the help of the .csv products import file.
but while processing this I want to insert the store_id in the ...
0
votes
1
answer
14
views
In Google Collab GDAL library is pre installed though when I am running "import gdal" I am facing an error "No Module" found
[When I have tried to use gdal I have tried installing gdal library and then trying to import it still facing problem of No Module Error in Google collab Use of GDAL library facing problem to import ...
-2
votes
0
answers
19
views
Conflict between "require()" and "import" statement (JavaScript, React, ESM, chai, mocha, supertest)
I know there are many articles that address parts of this issue such as:
Javascript, using require() and import in the same file
Error [ERR_REQUIRE_ESM]: require() of ES Module not supported
https://...
0
votes
0
answers
25
views
How to import csv file to POSTGRESQL when csv file in the same server on plpython3u?
ERROR: pandas.errors.ParserError: Error tokenizing data. C error: Buffer overflow caught - possible malformed input file.
i have this error when i tried to execute data from csv file
CREATE OR ...
-2
votes
0
answers
15
views
Is it possible to access exported elements for a package imported by another package which is then imported in Go? [closed]
I am trying to create a library for the rest of my program to use. I have two packages inside the library, Logger and Settings. I want to have an intermediate package called Library that imports the ...
0
votes
0
answers
12
views
laravel excel import incorrect data value (varchar)
I been trying to import value from Po No excel field to pono MySQL field with this code below. in some cases the value that been imported to MySQL are incorrect.
value on excel : 4500001396 meanwhile ...
0
votes
0
answers
17
views
Following a Kotlin tutorial in Android Studio: androidx.lifecycle.viewmodel.compose.viewModel import gives error
Been learning Kotlin and today I went to check out the "ViewModel and State in Compose" course.
In item 6, there's this code:
import androidx.lifecycle.viewmodel.compose.viewModel
@...
0
votes
0
answers
12
views
ImportError from file to file of the same folder in ROS Noetic package
I tried to start a semantic mapping script on python 3.8 in ROS Noetic on Ubuntu 20.04. The source folder is https://github.com/ExistentialRobotics/SSMI/tree/main
There are two files in the same ...
0
votes
1
answer
33
views
How to import a .slk file in python
I have a .slk file that I couldn't import in python, I used the following code but it doesn't work:
from sylk_parser import SylkParser
parser = SylkParser("fileName.slk")
I got this error:
...
0
votes
0
answers
25
views
TypeScript avoid TS2749 and avoid using typeof on classes imported using require (run using bun)
The code
Given a file named foo.ts containing a class:
export default class Foo { name = 'bar' }
Given a program using this module:
const Foo = require('./foo').default
function logFoo(foo: Foo) { ...
1
vote
0
answers
39
views
Server Side JavaScript to client side Javascript conflict: 'Uncaught ReferenceError: require is not defined'
I am a student working on a final project for my class and running into an issue connecting my database and website. I have asked my teacher and he is unsure how to resolve this issue, so I am turning ...
0
votes
0
answers
7
views
Import "six.moves.urllib.request" could not be resolved from source Pylance (reportMissingModuleSource)
In MacBook vscode, I get the Import "six.moves.urllib.request" could not be resolved from source Pylance (reportMissingModuleSource) error. How do I fix it?
(already pip install but I try ...
-2
votes
1
answer
17
views
How to configure beans for springboot tests
I have a springboot application with some classes and I try to test it.
@RunWith(SpringRunner.class)
@SpringBootTest
@Import(DroneControllerSpringTest.Config.class)
public class ...
0
votes
2
answers
33
views
Typescript import from sibling folder - cannot find module
Importing modules from other folder causes typescript errors.
I have a project with similar structure:
- src
- tsconfig.json
- types
- math.types.ts
- utils
- addNumbers.ts
- ...
-1
votes
0
answers
15
views
I cant create a GUI in Eclipse [duplicate]
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
i tried to import the swing JFrame to my project but eclipse tells me "The type javax....
0
votes
0
answers
37
views
How can I import a single column of data into Excel from tab-delimited text file?
Each of my tab delimited text files has 1 column of data I want (well 2, but baby steps). I want to select the file to import, have that 1 column of data paste into my spreadsheet (into the cell I ...
1
vote
1
answer
45
views
How can I import a local file into an Azure Function using Node?
I am writing an Azure Function in Node with some reusable code. I'd simply like to import it using:
import { myUtilsFunc } from '../utils';
This seems to work locally but I sometimes get an error ...
1
vote
2
answers
353
views
trying to use fl_chart of flutter but when i import it i got this kind of error : Error: 'TextScaler' isn't a type
Time when trying to import fl_chart.dart it through this error
: Error: 'TextScaler' isn't a type.
base_chart_painter.dart:31
final TextScaler textScaler;
^^^^^^^^^^
: Error: The getter 'textScaler' ...
0
votes
0
answers
49
views
Why built-in modules can be imported using 'import' command without being in the same directory?
For built-in modules such as datetime or random why can these modules be imported simply by doing so:
import random
print(random.randint(1,10))
While the random module is not in the same directory as ...
0
votes
1
answer
21
views
csv import error by copy command in sqllite
i am importing a csv file data by
IMPORT mytable FROM 'E:/code playground/csv files/research.csv' WITH (format csv);
above command but gives error
Execution finished with errors.
Result: near "...
0
votes
0
answers
42
views
Why is my csv file not importing into python? [closed]
testData = pd.read_csv(r"C:\\Users\\s4bukhari\\Downloads\\Adult_Test.csv")
Here is my code^^
Tried changing slashes, and adding and removing r, its still not working, would appreciate any ...
0
votes
0
answers
15
views
I am getting error Using vgg-face the error is an import error
the image is from the google colab
i have tried mutiple ways like installing various versions but no Luck the instructionns form the git repo well not working and tryed cloning it and using it but no ...
0
votes
1
answer
25
views
NextJS SyntaxError: Unexpected token 'export' on node_modules
I am trying to test/switch a Vite+React repo to NextJS+React.
After making the basic changes i got this error:
/.../repo-name/node_modules/react-router-typing/dist/index.js:1
export { generateUtils } ...
0
votes
0
answers
25
views
Uncaught SyntaxError: The requested module does not provide an export named 'subscribeToTopic' (at Appointment.vue:28:10)
I am trying to import a function located in a separate javascript file into the Vue project that I am working on. I am sure that the route of the file is correct but I keep on receiving an error like ...
-1
votes
0
answers
21
views
BH How to import .mb object into Blender?
BH How can a .mb object be imported into Blender 4.0.1?
looked online However, did not find any solution Would appreciate any suggestions how to convert the binary .mb object so that it may be ...
-3
votes
0
answers
31
views
pytest import module [closed]
I'm trying to import a module into my test file. This is the content of the file path; I mean, I'm in conftest.py
├── x1
│ └── python1.py
└── tests
└── lambdas
└── core
└── ...
0
votes
1
answer
31
views
How to place an image in node js api created on own from local folder
I am creating an API for my project using Node Js. I want to place an image for each object in the array. The project is in react so I just import image from the folder like
import { Thermite } from &...
0
votes
2
answers
51
views
useState in import
I get an error when I use useState in my App.js saying "Cannot use useState at a top level".
I created a component in src folder called Box.js containing an array with 6 objects each with ...
0
votes
0
answers
61
views
Parse PE File with C in Windows
I've just started programming in C, so I'm not a pro at all, so please excuse my (probably) not so good code, but I'm struggling to find the cause of this problem. The output of this code in VS studio ...
0
votes
0
answers
15
views
Import error in superset installation process
Getting this error: from werkzeug.urls import Href
ImportError: cannot import name 'Href' from 'werkzeug.urls' . while running superset db upgrade on Windows.
Flask version: 2.1.3
Werkzeug version: ...
1
vote
1
answer
159
views
`ModuleNotFoundError` in Jupyter Notebook
My notebook and modules are placed like below.
my_directory
modules # This is just a directory, not a module
my_module_1.py
my_module_2.py
my_notebook.ipynb
my_module_1.py is imported in ...
0
votes
1
answer
14
views
import sqoop to hdfs error Application failed 2 times due to AM Container
enter image description here
I try to import data using sqoop
cmd :
sqoop import --connect "jdbc:sqlserver://192.168.26.8:1717;databasename=VMC" -- table contact -m 1 --username sa --...
1
vote
1
answer
76
views
Missing Method when importing
Imports ClosedXML.Excel
Sub import()
'Open the Excel file using ClosedXML.
Using workBook As New XLWorkbook(file_pr)
'Read the first Sheet from Excel file.
Dim workSheet As ...
0
votes
0
answers
17
views
Typescript pageObject model - importing an extended class's imports?
I have a 'base' page.ts file with these imports
import { expect as expectChai } from 'chai';
import { expect as expectWdio } from '@wdio/globals'
and export this like
export default class Page
I have ...
1
vote
1
answer
37
views
import logic in python - for some modules we follow the structure from A.B.C import D, but for some modules we can bypass that and do from A import E
i'm having trouble figuring out the importing logic in python, i'll use an existing example from the langchain library
for module name langchain.chains.retrieval_qa.base.VectorDBQA
a direct import ...
1
vote
1
answer
49
views
Dagster unable to import module
I'm new to Dagster and I'm struggling importing my module into the Dagster code.
This is my project structure.
.
├── pyproject.toml
├── README.md
├── setup.cfg
├── setup.py
├── my-project
│ ├── ...
0
votes
0
answers
10
views
Exception has occurred: ModuleNotFoundError No module named 'numpy' [duplicate]
im a student
im using vs code for a while. i just started using numpy module first tim e it worked perfectly later im getting a n error that shows that numpy module not found
i installed the fresh ...
0
votes
3
answers
31
views
Importing a Function from External Module Without Colliding with Local Module Names in Python
I have the following files:
/somewhere/my_project/main.py
/somewhere/my_project/utils.py
/somewhere/else/utils.py
and I need to import a function from /somewhere/else/utils.py into main.py. Usually I ...
1
vote
1
answer
38
views
Unable to Import CoolProp
I am new in programming thing, I just start it yesterday
maybe its very basic
I want to import coolProp to input Cp and Cv value, but when i type:
import CoolProp.CoolProp as CP
it shows following ...
0
votes
0
answers
114
views
Tensorflow _ Symbol Zeros is already exposed as ()
I'm trying to import tensorflow with this code
import tensorflow as tf
and this error occurs
Tensorflow _ Symbol Zeros is already exposed as ()
I've tried to remove the import think that tensorflow ...
0
votes
0
answers
38
views
VSCode IntelliSense not working properly for NextJS Typescript
The problem
I've created a Next app with npx create-next-app using the App router and a bunch of 3rd party packages such as next-auth, axios, etc.
The problem is that I don't get import suggestions ...
0
votes
0
answers
45
views
Maui app doesn't work after downloaded from github
This week, I built a new computer and I installed Visual Studio 2022 community version. I installed all of the packets (included MAUI apps) but I encountered some errors when.
I obviously downloaded ...