Questions tagged [python-3.9]

A version of the Python programming language, first released on October 5, 2020. This tag is for issues that are specific to Python 3.9. For general questions use the more generic [python] and [python-3.x] tags.

Filter by
Sorted by
Tagged with
0 votes
0 answers
7 views

Check for this error during Python minimalmodbus communication test

Test Model : raspberry PI 3 (RPI3) USB TO RS485 ( FT232 ) Temperature/hygrometer (24V) CODE: import minimalmodbus as minimalmodbus import serial,time import serial.tools.list_ports as sp for i in ...
Yong Han's user avatar
0 votes
1 answer
12 views

celery autodiscover_tasks() not discover all packages but some packages [closed]

i have project with django and celery and using app.autodiscover_tasks() autodiscover was work and discover all packages and after some changes autodiscover_tasks not discover all package but discover ...
hn_tired's user avatar
  • 700
1 vote
1 answer
40 views

Question about .py program (minimalmodbus) on raspberry pi

I ran the .py script below in a window, got the results, and then passed them to the Raspberry Pi as pscp to test the execution. import minimalmodbus as minimalmodbus import serial,time import serial....
Yong Han's user avatar
1 vote
1 answer
42 views

How to insert small int values to NumberLong in document DB / mongo DB by using python/pymongo

When we are trying to insert small integer values let's say 45 to documentDB. It's been saved as just an integer/Number value in documentDB. But I want that to be saved as NumberLong irrespective of ...
Rahman Shaik's user avatar
1 vote
1 answer
82 views

Find indexes of rows from an array that contains the rows of another array

Say I have two arrays np1 and np2 with different row sizes and column sizes. np1 is known to contain all the elements of np2. Now I want to compare them row-wise, to know which rows of np1 contains ...
noobn1's user avatar
  • 11
0 votes
0 answers
42 views

Python3.9 -Encountering 403 Error When Scraping Next.js WebApp with Python's `requests.get()` on Google App Engine

I'm running into an issue when trying to scrape HTML text from rollercoin.com using Python's requests.get() function. Notably, rollercoin.com is built with Next.js. When running the code locally, I ...
Shani Elkalay's user avatar
1 vote
0 answers
18 views

AWS lambda function integration with snowflake connectivity error

I am working on building python code in lambda function to receive event notifications from webhooks and load the extract payload data into snowflake but before that I was testing to check snowflake ...
sunny_etl's user avatar
0 votes
0 answers
8 views

Is there any library in python 3 which can read cookies from incoming request, remove invalid characters and then proceed with rest of the flow

I am facing a problem in my cherrypy APIs for a web application, where there is a redirection to external site within my primary domain, and it is setting a cookie which is not in valid format and in ...
Bvadnag's user avatar
0 votes
0 answers
48 views

How to accept this date format "1st Sep 2023" using pydantic model

How to accept this date format "1st Sep 2023" using pydantic model I tried using pydantic model, but getting error stating invalid date format. "1st Sep 2023" this date will be ...
KIRAN KUMAR N's user avatar
0 votes
0 answers
17 views

I am attempting to calculate the total number of available tables when an object is detected by the IR sensor

I am attempting to calculate the total number of available tables when an object is detected by the IR sensor. How can I get the actual result without the loop. import BlynkLib from BlynkTimer import ...
joyce's user avatar
  • 21
0 votes
0 answers
15 views

Changing Python Interpreter in Spyder resulting in IPython Console not loading

My current Anaconda installation comes with Python 3.11.3, but I want to change to another version of Python 3.9.9 that comes with an application that I'm using. However, every time that I've switched ...
kevw22's user avatar
  • 163
0 votes
1 answer
48 views

I get the problem in python 3.9 : " serial' has no attribue 'Serial' "

i'm learning python. And in a serial stuff : serial_port = serial.Serial(port = "COM3", baudrate = 9600) i get the "attribute serial" error "module serial has no attribute '...
gowb0w's user avatar
  • 11
0 votes
1 answer
34 views

python3 subprocess.Popen call prometheus always reporting an error: No such file or directory [duplicate]

I call prometheus by using the python3 subprocess.Popen function, always reporting an error: No such file or directory. What is Problem? my code as follow: if __name__ == '__main__': ...
Baker's user avatar
  • 71
0 votes
0 answers
39 views

Python 3.8 error in cloudify while running ansible

I am trying to run the blueprint Ansible-Azure-VPC which is in the marketplace of Cloudify. I am getting the following error: : [DEPRECATION WARNING]: Ansible will require Python 3.8 or newer on the ...
user2622350's user avatar
0 votes
0 answers
31 views

Trouble Fetching Forex Data Using ib_insync Library

Hello fellow developers, I'm encountering an issue while trying to fetch forex data using the ib_insync library for the Interactive Brokers TWS API. I've been trying to create a Python app that ...
Rob Mowatt's user avatar
2 votes
1 answer
885 views

Getting hnswlib error Index' has no attribute 'file_handle_count'

I am trying to use chromadb which is giving me error: c:\Users\satya\AppData\Local\Programs\Python\Python39\lib\site-packages\chromadb\config.py in instance(self, type) hnswlib_count = hnswlib.Index....
Satya's user avatar
  • 8,703
0 votes
0 answers
12 views

subprocess will not output file when ran from Spyder IDE

I am trying to write a short script to call ilastik (an interactive machine learning software for image segmentation) as part of my pipeline. My script can find my files in the input folder but will ...
DiegoCaron's user avatar
0 votes
0 answers
89 views

load_dataset() from the Huggingface datasets library does not work with Python 3.9, but with Python 3.10 (KeyError())

The minimal working example to load the Huggingface SQuAD v2 dataset using from datasets import load_dataset dataset_squad_v2 = load_dataset("squad_v2") does not work on my Ubuntu 22 ...
Jan Spörer's user avatar
1 vote
0 answers
321 views

How to downgrade python version to 3.9 in colab without creating virtual environments? [solution found]

I'm trying to downgrade python to 3.9 in colab as its kernel is now set to 3.10 by default. I followed the steps in https://stackoverflow.com/questions/68657341/how-can-i-update-google-colabs-python-...
rfy1004's user avatar
  • 11
1 vote
1 answer
97 views

Compile custom OpenSSL-1.1.1t with source Python-3.9.17 in CentOS-7.9.2009 docker image

i am trying to compile Python-3.9.17 with custom OpenSSL-1.1.1t from source. I have followed steps mentioned in python openssl linking documention using --with-openssl=/path/to/ssl. After installation,...
Kavin Kumar's user avatar
0 votes
0 answers
14 views

Why can't output info, debug log? [duplicate]

I am learning about the logging package, and when outputting log control, I find that it is always impossible to output logs at levels below info.As follow: import logging logger1 = logging.getLogger(...
Baker's user avatar
  • 71
0 votes
0 answers
29 views

raise PoetryException(f"Failed to install {path.as_posix()}") for scikit-learn

I want to use alpine image for python for my production, since it is free from security vulnerabilities. I have a simple project 'my_project' It contains a simple helloWorld program, which is # ...
user9920500's user avatar
0 votes
0 answers
56 views

Different cluster result with same random_state between versions 0.22.2 & 1.2.2

I'm working on a clustering problem. To ensure result reproducibility, we initially set the random_state parameter in KMeans() to 0. However, after updating scikit-learn from version 0.22.2 to version ...
Okorimi Manoury's user avatar
1 vote
0 answers
80 views

Problem in installing pandas with python 3.9

Here is the final stack trace. I was having problem with botocore and boto3, when I changed version for botocore, pandas error popped up. Please help. pandas/_libs/reduction.pyx:592:15: Assignment to ...
Vishal Singh's user avatar
0 votes
0 answers
20 views

Included all thresholds, code still not generating output

I wanted to create an app that sends a notification depending on what the air quality is around you. I went to IQAir to get the API. With the help of ChatGPT, I created the lines of codes. It shows ...
Sooj Han's user avatar
0 votes
0 answers
48 views

Retrieve originating package of warning object

Task For a given block of code implying the use of different packages (eg. pandas, numpy, etc) i need to retrieve a list of all the warnings created. Partial solution with warnings.catch_warnings(...
Andrei Terecoasa's user avatar
0 votes
0 answers
18 views

Python 3.9 can't find tensorflow.keras and subpackages

I'm using a conda environment with python 3.9, using pup install -r requirements.txt for the packages. I have tensorflow==2.12 installed, and have tried both with and without keras==2.12. Either way, ...
AdamF's user avatar
  • 519
1 vote
0 answers
49 views

FastAPI api giving "str type expected" error [duplicate]

UPDATE: I downloaded the Uvicorn service and ran it again, then it worked I have this code that returns the url of an amazon rds instance: def get_host(instance_name): """This ...
Andrea Aranda's user avatar
0 votes
1 answer
127 views

AttributeError: module 'strawberry.experimental' has no attribute 'pydantic'

I recently upgraded to python 3.9.17 from 3.7.11 and changed poetry version to 1.3.2 . However I am getting errors when I am trying to run that application. I am using strawberry-gql too However I am ...
user9920500's user avatar
0 votes
1 answer
53 views

Program on PyQt5 + QWebEngineView closes when loading youtube.music site

The program on PyQt5 + QWebEngineView closes when loading youtube.music site after about 3-4 seconds after opening, without any error, while any other site loads without any problems and the program ...
ツDeeffest笑's user avatar
0 votes
0 answers
35 views

is swisseph package is mandatory for kerykeion?

I am using kerykeion library of python. My question is that when I am running kerykeion in my development environment, I am not getting any error but when I try to deploy something, I am getting error ...
moxa d's user avatar
  • 1
0 votes
0 answers
176 views

cookies are still valid after logout in superset

We have our superset instance tested by security team. they are performing following steps - 1. login into superset. 2. copy the session cookies with the help of browser extension. 3. logout from ...
Kamal Kumar's user avatar
1 vote
1 answer
87 views

KDB Connection in python 3.9

In python 3.7.6, I connected to KDB database using QPython module. After upgrading my Python version to Python 3.9, I can't connect to KDB database. The reason is QPython is not compatible with Python ...
Syed Shahid S's user avatar
0 votes
0 answers
12 views

I want to print the player's case value in my Deal or No Deal game

I am coding a deal or no deal game using python. I ran the game several times and fixed some of the bugs already. Currently, I am fixing this problem that the code keeps on printing the remaining ...
zzzarkaztik's user avatar
0 votes
0 answers
26 views

Issue running Python unittests: "Empty suite" error

I've created the function and trying to test it, but when I ran the test I got the "Empty suite" error. Why? That's the module I imported in the file where I've gotten the issue. def ...
education's user avatar
0 votes
1 answer
60 views

Python logger has no attribute 'info', 'debug'

I have a class that I use to have a single logger across my project. import os from logging import DEBUG, FileHandler, Formatter, Logger, StreamHandler, getLogger from typing import Set class ...
Jacobo's user avatar
  • 1,269
0 votes
0 answers
18 views

No module named 'quandl' after pip3 install, using Spyder on Mac

I'm trying to write a script that requires quandl. I have pip3 installed it via terminal however when I go to import it in my script I get the error: ModuleNotFoundError: No module named 'Quandl' ...
Daniel Pitman-Weymouth's user avatar
0 votes
0 answers
84 views

Pyarrow issue with hdfs connectivity

Earlier we were using pyarrow 0.13.0 version with python 3.7.16 version and through hdfs.connect we were able to establish connection with hdfs. As python version got upgraded to 3.9.10 we have to ...
Abhay's user avatar
  • 63
-1 votes
1 answer
247 views

Python 3.9 use OR | operator for Union types?

Since Python version 3.10, Unions can be writte as X | Y which is equivalent to Union[X, Y]. Is there some way/workaround to easily use (or just ignore) the X | Y syntax on Python 3.9? I have a bigger ...
slarag's user avatar
  • 153
1 vote
1 answer
42 views

memory increase after upgrading setuptools

After upgrading setuptools to 65.3.0 all of sudden there is memory increase for majority of the process in the system. To narrow down the issue, I tried to find out the problematic import and checked, ...
Dinesh Reddy's user avatar
0 votes
1 answer
78 views

python3.9 quit unexpectedly (segmentation fault) on Monterey M1

Today I was running a python script from terminal and I can't anymore: zsh: segmentation fault python3.9 script_name.py The window with more details says: ------------------------------------- ...
Py-ser's user avatar
  • 1,860
0 votes
0 answers
40 views

Python Tkinter: How to fix image "pyimage1" doesn't exist

I have been working on a school project but for some reason the error "image "pyimage1" doesn't exist" exist during debugging. The error message pops up on the "logo_label = ...
Ryan Chieng's user avatar
0 votes
0 answers
68 views

Error using Thread.start() with Python3.9 and Gevent worker class

We have a Flask App which extensively uses threading.Thread class to spawn threads for Async API requests. Sample flask app that imitates our application is as below. from flask import Flask import ...
Chethu2288's user avatar
3 votes
0 answers
758 views

RegexMatchError: get_throttling_function_name: could not find match for multiple

(Using pytube15.0.0) I am rerunning a code to download audio from YouTube using the following code: search_kw = tracks[i+1]['Artist'] + '+' + tracks[i+1]['Track Title'] print('Preparing ' + tracks[i+...
Anthony Reid's user avatar
1 vote
0 answers
151 views

<input>:1: RuntimeWarning: invalid value encountered in matmul

I am having an error when inputting data that is processed in sklearn's pipeline.py I am trying to fit a model using a quite large training data matrix X which is multiplied in sklearn's extmath.py ...
Hyung-Jo Kwon's user avatar
0 votes
1 answer
42 views

Pyinstaller to bundle code package with dynamic imports

I have a code that has dynamic module import calls using importlib.import_module and uses Python3.9.10. The code structure is as below `main.py .\Main_dependency |__ test_calling_script.py .\...
pedru's user avatar
  • 13
0 votes
0 answers
16 views

Pass additional information to IBM Watson Machine Learning job and retrieve via python API

I've been using IBM CPLEX Optimization Studio to run Decision Optimization (DOCPLEX) models locally with python API. I have a bulk of temporal data (hourly time steps for 20 years) and I define and ...
HalfRyot's user avatar
0 votes
2 answers
48 views

how do i fix syntax error in Python shell script?

after say i typed the following code: class Students: ... def _init_(self, name, age, grade) File "<stdin>", line 2 def _init_(self, name, age, grade) ...
Iwy's user avatar
  • 1
0 votes
1 answer
98 views

Aws Lambda function API Gateway working fine in AWS but not in Postman or other platforms

I have developed a python code where account details of bank user are stored as well as transactions happen between users and sub users. I want to integrate it to IBM Watson Assistant through webhook. ...
Shaik Saad Abdul Tawwab's user avatar
0 votes
1 answer
14 views

Accessing functions between Kivy classes: tips and resources needed

I'm calling another class with the same name instead of the existing class all the time and the code continues as if nothing happened, I don't know if this is something specific to kivy, how can I ...
DARKTITAN's user avatar

1
2 3 4 5
23