Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
65 views

I'm making a sort-of mod loader that automatically loads certain classes with a specific variable defined from any files in the root directories' mods folder. My file structure is as follows: mods - ...
Ice's user avatar
  • 21
0 votes
0 answers
23 views

When I open "IDS Camera Manager", I can read all serial numbers, camera type and CameraID of the connected IDS cameras. I guess that the same functionality expected for the pyueye.ueye....
2diabolos.com's user avatar
2 votes
1 answer
65 views

I want to install my single file module together with its py.typed file using setuptools and pyproject.toml. I'm packaging a Python single-module, and so far I was using a very simple pyproject.toml: [...
Raúl Núñez de Arenas Coronado's user avatar
2 votes
1 answer
108 views

I'm implementing my own Python module package, called jbpy. I'm using setuptools with a pyproject.toml file as the build system. I'm working on Ubuntu 24.04, but I also get the error under WSL on a ...
Jens Bang's user avatar
0 votes
0 answers
74 views

I have been trying to load Python module inside Unbound DNS. Following is the version list of the tools I am using:- Python: 3.10.12 Ubuntu: 22.04 Unbound DNS: 1.23.0 The unbound.conf contains ...
Krish Patel's user avatar
0 votes
1 answer
43 views

ModuleNotFoundError: No module named 'Teacher' even though the file exists I am trying to import a function from one Python file to another, but I keep getting the error: ModuleNotFoundError: No ...
Devang soni's user avatar
0 votes
1 answer
50 views

I'm reproducing a project code and trying to execute it locally. It uses Python 3.6 and old packages dating to 2017 and PIP struggles to install them and returned error codes which were 40 pages long. ...
SpaciousCoder78's user avatar
0 votes
0 answers
70 views

I am making a React app. I am using some Python code to automate a few things. But currently I am duplicating some Python code across separate components. I would like to avoid this, and place all my ...
nbofni's user avatar
  • 47
0 votes
1 answer
78 views

I'm trying to use the Python vermin utility to determine the minimum version needed to run a script of mine. Running it, I get: $ vermin --no-parse-comments foo.py Tips: - You're using potentially ...
einpoklum's user avatar
  • 137k
0 votes
1 answer
58 views

I have the following structure: project/ |- src/ |- __init__.py |- package/ |- __init__.py |- module1.py |- module2.py Let's say module1.py ...
khteh's user avatar
  • 4,280
1 vote
2 answers
57 views

So I'm trying to write a simple wsgi python module where I use __init__.py to bring in variables & functions from another file but I can't seem to get the module to load. I keep getting the "...
Jeremy Daniel Gregorio's user avatar
0 votes
1 answer
38 views

I wrote a python project that automates tasks and makes use of the smartsheet api but when I package this project into an executable with nuitka I get the error: ImportError! Could not load api or ...
Mariano Gongora's user avatar
2 votes
3 answers
91 views

Suppose I have two Python script files: foo and utils/bar.py in some directory. In foo, I have: import os import sys sys.path.append(os.path.dirname(os.path.realpath(__file__))) from utils.bar import ...
einpoklum's user avatar
  • 137k
-1 votes
1 answer
161 views

I am currently creating a python library, and I want to find what is the best way for a user to install it on their computer. It is not distributed on Pypi (or Pypi test) for now, so I want them to ...
larticho's user avatar
  • 169
0 votes
1 answer
59 views

I have a project with the following structure: project/ checks/ __init__.py <some files here> engine/ __init__.py <some files here> models/ __init__.py <...
EntangledLabs's user avatar
-1 votes
1 answer
49 views

I have a Python3 project arranged as follows: C:\automation\framework\constants.py C:\automation\tests\unit-tests\test_myunittest.py In my unit test, I'm trying to call methods in framework folder, ...
bearaman's user avatar
  • 1,091
1 vote
1 answer
416 views

I have the following code structure in my Python (3.12.3) application: **ROOT** -- .venv -- azure_functions ---- function_app.py ---- host.json ---- local.settings.json ---- requirements.json -- src --...
dododo's user avatar
  • 4,783
0 votes
1 answer
37 views

I need to import enum class which sits in dir A from some other file which is in dir B. So I have the following: - enums -- __init__.py -- flavors.py - setUp -- test.py flavors.py from enum import ...
camel's user avatar
  • 97
1 vote
1 answer
76 views

I want to create a module called 'constants.py' that contain all the constants specific to my system. To offer flexibility I would like to be able to access the constants directly like this: constants....
James's user avatar
  • 81
-1 votes
2 answers
69 views

The following directory structure: repo/ ├─ third_party/ │ ├─ project/ │ │ ├─ src/ │ │ │ ├─ moduledir/ │ │ │ │ ├─ __init__.py │ │ │ │ ├─ main.py ├─ pythonscript.py In main.py there's a (...
glades's user avatar
  • 5,374
0 votes
1 answer
83 views

I get error while trying to execute pytest UTs for the project. E TypeError: 'module' object is not callable I have the following repository structure: ├───src │ └───company │ ├───acc │ ...
Paweł Tajs's user avatar
-2 votes
1 answer
48 views

I am trying to use the neat-python package. I had to install it directly from the github using pip install git+https://github.com/CodeReclaimers/neat-python.git because they haven't updated their pypi ...
The odor's user avatar
0 votes
0 answers
49 views

I'm using Python 3.12.5 and my directory structure is as follows: project/ --> subproject/ --> scripts/ --> script.py --> utils/ --> __init__.py ...
OJT's user avatar
  • 909
0 votes
1 answer
110 views

For admin reasons I can't edit the PATH variable so I couldn't use pip to install my PyPi and 3rd party libraries/modules, so I worked around it and I installed their source code using the official ...
Giorgio Doveri's user avatar
1 vote
1 answer
61 views

I have two functions myFunc() and myOtherFunc() defined in two different files: generic.py and no_choice.py with two different implementations. I import them as follows into main.py: main.py: if ...
sighclone's user avatar
  • 114
0 votes
1 answer
627 views

I'm pretty new to this stuff, so I'm going to provide as much information as possible just in case it is relevant. In VSCode (1.93.1), I created a Python script which makes updates to a Google Sheets ...
DameTheStoic's user avatar
-2 votes
1 answer
484 views

I have installed Python 3.12.6 with idle Python, Python, Python module docs. All 64bit versions are in version 3.12 respectively but I can not seem to install modules. I did this in the command prompt:...
IChewWater's user avatar
1 vote
3 answers
258 views

Let's assume I have two parallel directories, with simple python files. 'dir_one' with file_one.py 'dir_two' with file_two.py In file_one.py there is a function named function_one. How can I import ...
Broono's user avatar
  • 111
0 votes
1 answer
444 views

I am trying to write a simple script that should include a library for working with PDFs that I found online called Camelot. I installed it with pip and the module displays in the site-packages folder ...
Giorgio Doveri's user avatar
1 vote
1 answer
106 views

I recently encountered a perplexing issue regarding module imports in Python, particularly with the way instances of classes can be duplicated based on different import styles. I had to fight to be ...
Nico's user avatar
  • 329
1 vote
3 answers
90 views

I'm opening the same python project in pycharm and everything is working well opening same folder on vs code with same interpreter I'm getting error 'Unable to import' on local modules in the project ...
Michael Gabbay's user avatar
0 votes
1 answer
74 views

I am working on a library with some others. Our git repo (called modulename) looks like this modulename/ src_file_1.py src_file_2.py tests/ ... .../ The instructions are to clone this somewhere ...
ACarter's user avatar
  • 5,747
0 votes
1 answer
44 views

Suppose several classes are defined in multiple different files across a Python project, such as mylib.somefile.Class1 mylib.somefile.Class2 mylib.anotherfile.Class3 mylib.athirdfile.Class4 ... What ...
glass-ships's user avatar
0 votes
1 answer
546 views

I am running MicroPython v1.23.0 on 2024-06-02; Raspberry Pi Pico with RP2040 and I'm trying to import a module that I have written (called lcd_module). However, I keep running into this import error. ...
Ryderr's user avatar
  • 103
0 votes
1 answer
42 views

Problem Description: I am working on a Python project with the following structure: Scriptus ├── frontend │ ├── hf_call.py │ ├── slide_deck.py │ ├── slide_gen.py │ └── ui.py ├── ...
Kaurcs2001's user avatar
0 votes
1 answer
50 views

import pygame from math import radians, sin, cos from datetime import datetime class Clock: def __init__(self): self.width, self.height = 800, 800 self.white = (255, 255, 255) ...
Mohamad Homaei's user avatar
0 votes
1 answer
386 views

I'm getting an error: AttributeError: property 'mode' of 'JpegImageFile' object has no setter While trying to open an image using the Pillow library. My code: from pil import Image as pl my_img = pl....
B Kazimy's user avatar
3 votes
1 answer
1k views

I'm trying to execute a python task using fab. I've installed fab2 for python3 and trying to use it to run the task in a venv. Unfortunately using fab2 keeps giving me this error: (venv) My-MacBook-...
scottstots's user avatar
2 votes
1 answer
2k views

I have a custom Python module I want to use in another project. This module gets deployed to production as well. I have two options: Add a setup.py and install the module locally with pip. Add the ...
Salvatore's user avatar
  • 12.6k
0 votes
0 answers
289 views

I have a utility package for Python projects I maintain and use. It’s a bundle of lightweight, common, junk-drawer tools (e.g. command parsing, app lifecycle management, document generation, &c &...
fish2000's user avatar
  • 4,435
0 votes
1 answer
119 views

Does Zscaler has exposed api endpoints to backup configuration or any python library available to backup configuration settings ? I have the documentation of common endpoints which zscaler has exposed ...
wasif hussain's user avatar
0 votes
1 answer
51 views

I am developing a Python application using Tkinter. I have created a module which is essentially a modal to be called elsewhere in the application - in the same file I check if name is main, and I ...
Alex's user avatar
  • 1
2 votes
1 answer
87 views

I have a similar project structure to one below. project_name/ │ ├── apps/ │ ├── items/ │ │ ├── purchases/ │ │ │ ├── migrations/ │ │ │ ├── templates/ │ │ │ ├── __init__.py │ │...
Dante's user avatar
  • 435
-3 votes
1 answer
96 views

whenever i try to use python module install in the shell (im trying to use the command "python -m pip install pygame") and whenever i try to it says "Python was not found; run without ...
biytz's user avatar
  • 9
1 vote
2 answers
85 views

My Python project has the following file structure. module/ ├── __init__.py ├── main.py │ └── sub_module/ ├── __init__.py ├── foo1.py └── foo2.py My goal is to import a class Bar from ...
St4rb0y's user avatar
  • 319
1 vote
2 answers
230 views

I have just created a library with Pybind11 from the C++ side: I did it with MSYS2 and CMake and Make. (I have GCC, Make, CMake and Pybind11 installed with the commands) pacman -S mingw-w64-x86_64-gcc ...
flori10's user avatar
  • 536
0 votes
2 answers
175 views

Let say I have a folder Pkg1, and a library also called Pkg1 (installed elsewhere) on the computer. I also have a file run.py at Pkg1 > scripts > run.py. I want to do: from Pkg1 import Function1 ...
Nikola Tolzsek's user avatar
0 votes
1 answer
152 views

I'm using an old version of Python (v3.2) on a USB standalone environment (Portable Python) for simplicity and educational purposes since it works virtually on any computer without any software ...
ITlearner's user avatar
0 votes
2 answers
1k views

I'm a new programmer (6 month) and use this forum for the first time. So please allow me missing information and incorrect entries. I wrote my own logging package, and like to import it into another ...
Zoorn's user avatar
  • 1
0 votes
1 answer
221 views

I need to write some scripts for django and trying to set up the DJANGO_SETTINGS_MODULE environment variable at the beginning of each script. The scripts, manage.py and myproject directory are in the ...
user1933205's user avatar

1
2 3 4 5
42