Category "python-import"

Broken Airflow DAG: No Module Found From Docker Requirement Instillation

I am facing an issue where my DAG isn't importing into Airflow due to a "ModuleNotFoundError: No Module Name package" error. The provider throwing the error sho

Python3: Import Module over Package

I'm looking for suggestions to import a module over a package in Python3. I don't have control over the names of the files so changing them is not an option. Ad

Python - overcome the project path problem on importing

My project structure is: main.py ----gui/load_ui.py ----gui/resource.py in load_ui.py I am importing resouce.py. in main.py im importing load_ui.py since it's

Global variable is not updated if it is from other .py file

As you know, the code: var = "flower" def update(): global var var = "forest" update() print(var) will properly modify the variable var, but if you do

Cannot import name 'get' from partially initialized module 'requests'

I have problem with requests package. In past requests was working, but today for no reason it stopped working. I am just importing requests and it cause error.

My Python library will not load and adding path to .zprofile did not work

I've had python 3 insalled on my system for a few months and have never had an issue importing libraries before. After using pip3 to install pygame, IDLE couldn

from django.core.management import execute_from_command_line not working

I am working on a bug project. Which is on Python 2.7, we are migrating to Python 3.9. I am getting import errors in manage.py during importfrom django.core.man

Python: 'ModuleNotFoundError' when trying to import file from same directory

Running Python 3.10. I have three files in the same directory named Chess, one of which is a __init __.py to make sure it's considered a module. In one file, Ch

ImportError: cannot import name 'Message' from partially initialized module 'pyrogram.types' can not import it

I am using pyrogram in a program but when i run the program it gives import error i uninstalled and reinstalled it but the problem is still there. I am not able

Python3 importing files from parent directory / relative importing

I have the following file structure: parentfolder/ utils.py myProgram/ main.py other.py I will be running the main.py which utilizes other.py

Python terminal closes when importing BeautifulSoup

I have a simple python program, that is supposed to scrape some information from the internet and do stuff with it. When I run the code in PyCharm (IDE) it work

python import socket class from other modules

I have created a class(object) connection_manager using socket TCP in a module (connection.py): #file connection.py HOST = "127.0.0.1" # Standard loopback inte

Import functions that use ipython magic

In ipython cells you can execute shell commands as follows: ipython: print("asdf") !echo asdf However, if you try to import this code from file, asdf.py: def a

ImportError: No module named solcx

I installed py-solc-x via pip3 install py-solc-x in the terminal but when I run the program, I still get an importerror. What's going on here? My code: from sol

Unique import * only allowed at module level

I am making a utility program which has multiple programs built into it but I made some changes to my program for it re-run when the user has prompted which the

can't import function from different module/file

I'm super new to this and this is my first time posting on forum.. trying to import a function from books.py to be used in logic.py File structure: application

how to import boto3 athena client exceptions

I am working with athena from within my python code, using boto3, as follows: def query_athena(query, output_path): client = boto3.client('athena') clie

`UnencryptedCookieSessionFactoryConfig` error when importing Apex

I'm trying to use Apex and whenever I try to import it (or anything involving it) I get the following traceback: Traceback (most recent call last): File "<

How to solve (NaN error) when given column specific name

I have many text files include data as follow: 350.0 2.1021 0.0000 1.4769 0.0000 357.0 2.0970 0.0000 1.4758 0.0000 364.0 2.0920 0.0000

How to solve (NaN error) when given column specific name

I have many text files include data as follow: 350.0 2.1021 0.0000 1.4769 0.0000 357.0 2.0970 0.0000 1.4758 0.0000 364.0 2.0920 0.0000