Questions tagged [python-3.7]

Version of the Python programming language released in June 27, 2018. For issues that are specific to Python 3.7. Use the more generic [python] and [python-3.x] tags where possible.

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

Problem with Mayavi import error in matlab

I have created this environment: conda create -n mbn_env -c conda-forge python=3.7 seaborn matplotlib pandas click basemap scikit-image nb_conda nibabel vtk netcdf4 mayavi and I'm using the code from ...
Luiza Machado's user avatar
0 votes
0 answers
9 views

wexpect and finding expected prompts

In python, I am trying to automate the execution of an exe. There are several things that need to be done within a GUI that is popped open when running the exe mannualy. My first issue is trying to ...
David Campbell's user avatar
-1 votes
1 answer
22 views

subprocess error while installing aiohttp==3.8.1 and setproctitle==1.1.10 on mac

I am trying to run a local already done django project but I get this subprocess error while trying to install these to packages. I'm using python3.7 and my device is mac OS. These are the main errors:...
Barbod Imani's user avatar
0 votes
1 answer
14 views

Unable to find 'endstream' marker for obj starting at 13367

When executing this piece of code: from pypdf import PdfReader,PdfWriter import traceback try: input_pdf = PdfReader(dwnld_filepath) output_pdf = PdfWriter() image = input_pdf.pages[0] ...
MUHAMMED SHAFEERALI P's user avatar
0 votes
0 answers
12 views

How to Run FasterSeg on Jetson Nano

I have encountered an issue, and I hope to run the FasterSeg model on Jetson Nano. I followed the steps on the original author's GitHub website and tried to align my system environment as closely as ...
Eggsy's user avatar
  • 1
0 votes
1 answer
48 views

Error installing python3.7 on ubuntu 16.04

I'm trying to install Python3.7 on ubuntu 16.04. I tried the installation steps on the internet, but I got an error code. My installation steps: sudo apt update sudo apt install software-properties-...
Eggsy's user avatar
  • 1
-1 votes
0 answers
21 views

Python file not emailing result success via Task Scheduler but emails result success via Command Prompt

I am trying to get a Task Scheduler job to execute a python script daily which does some tests and sends the results to me via email. In the Actions section I put into the Program/Script field: \...
William Trebes's user avatar
0 votes
0 answers
18 views

Missing modules from python when running py2exe

As I am using Python version 3.7.9 for my project. So I finally need to build an exe file so here I have py2exe version 0.12.0.2 which works for the specified python version. When I try to run this ...
Arun Jothi's user avatar
2 votes
1 answer
54 views

Why does conda install non-compatible jupyterlab dependency (prometheus_client) in my environment?

I am running conda via a standard miniconda3 installation on Ubuntu 20.04. I need a Python 3.7 environment and have the following simplified conda environment file (test_env.yaml): name: test-env ...
olamarre's user avatar
  • 175
0 votes
1 answer
53 views

Using Mixer to Play Mp3 Throws Error About libmpg123-0.dll, but There's No Context

I wanted to play a .mp3 file to my microphone using python code that I found in a Stack Overflow post, but I had to do some tweaking with the steps I had to take. Here are the steps that I had to do: ...
John Davis 2's user avatar
0 votes
1 answer
57 views

ModuleNotFoundError: no module named XY

ModuleNotFoundError: no module named XY XY is the cloned repository The above error is a result of the import statement at the beginning of the training file. I have cloned a repository from GitHub ...
Sachin Bharadwaj Manjunath's user avatar
0 votes
0 answers
41 views

Is there a module like lib2to3 that could update Python scripts written for 3.7 to be compatible with 3.12?

I have over 100 scripts that are not compatible with 3.12. While technically possible to complete manually, this would be quite time intensive. Is there something like lib2to3 that can update these ...
Andrew's user avatar
  • 23
0 votes
1 answer
59 views

Python: type annotate a function return value that returns a class defined in that function

I'm wondering what the proper way to type annotate a return value of a function or method where a class is defined inside of that function. For example: from typing import List from dataclasses import ...
Joe J's user avatar
  • 10.2k
0 votes
1 answer
49 views

Getting error while installing py2exe for python 3.7.9 version

I am using Pycharm on Windows 10 and needed to install py2exe package. So I tried to install it with the github repository "https://github.com/lambacck/py2exe-3 ". I don't know what is the ...
Arun Jothi's user avatar
2 votes
1 answer
99 views

getting exact match for list of columns name from files

I have created a script where I read from a list of column names that need to be deleted and specified a list of directories to scan for the sql and python files to find a match using the python - ...
punsoca's user avatar
  • 493
0 votes
0 answers
19 views

Python Run multiple subprocesses with live, overwriting output

Under Windows 10 with Python 3.7.9, I am using Python's subprocess.Popen to spawn multiple subprocesses. Each of those outputs an overwriting, live output that looks like this : C:\Users\Me\MyFolder&...
Charles's user avatar
  • 1,026
0 votes
1 answer
48 views

Why is Python's subprocess output different than cmd's of a PTC command?

Im using Python 3.7 and the im viewissue <itemID> command of Integrity Client 12.5. When I query and item using this in cmd, I get every detail perfectly decoded, no unknown bytes or hexadecimal ...
Daniel's user avatar
  • 25
0 votes
1 answer
65 views

Python39 and pymysql

I've just tried upgrading up to python3.9.5 from 3.7 and I'm encountering a strange behavior that I can't quite nail down. It involves pandas1.3 and pymysql1.1.0. The strange part is that the ...
Derek_P's user avatar
  • 660
1 vote
1 answer
32 views

Attribute error in sending email through smtp in python 3.7

I have hidden id and password in this question. But, gmail password was generated after turning on 2 step verification and generating an app password. ERROR-- AttributeError: module 'smtplib' has no ...
Sentinal's user avatar
4 votes
1 answer
107 views

How to statically protect against str == enum comparisons?

More often than not, I make the following mistake: import enum class StatusValues(enum.Enum): one = "one" two = "two" def status_is_one(status: str): return status == ...
KamilCuk's user avatar
  • 125k
0 votes
0 answers
44 views

PyInstaller (ImportError: cannot import name 'jwt' from 'jwcrypto') (SOLVED)

Good morning. I have an application in Python 3.7 which uses several libraries and files that has the following structure: app2: - Blockchain - db - secrets - smartcontrats - utils - menu....
J.A's user avatar
  • 1
0 votes
0 answers
21 views

How to bulk update python libraries without admin rights? [duplicate]

I am using VSCode 1.81.0 and Python 3.7.6 for a regression analysis project, on a Windows 10 Enterprise environment. The Jupyter example given by the coach is returning errors about the seaborn ...
Silviu's user avatar
  • 1
0 votes
0 answers
16 views

Is it actually possible for me to use py2app to package my program?

So i'm not too experienced with coding in general, but i created this program that uses opencv and mediapipe, though both libraries seem to not work well with py2app. I say this because when i try and ...
Teblaze's user avatar
1 vote
2 answers
501 views

How do I install Python3.7 on Ubuntu 16?

I tried this approach but got: add-apt-repository ppa:deadsnakes/ppa Error processing line 1 of /usr/local/lib/python3.5/dist-packages/distutils-precedence.pth: Traceback (most recent call last): ...
personal_cloud's user avatar
-3 votes
1 answer
93 views

import cv2 --- ImportError:DLL load failed:

I got this error message while trying to run my main.py: Traceback (most recent call last): File "main.py", line 5, in <module> from preview import generate_preview_image File "...
J Peg's user avatar
  • 7
0 votes
0 answers
65 views

Segmentation fault error while running pyspark in Apache Spark 2.4.7

Getting Segmentation fault error while running /opt/spark2/bin/pyspark --master yarn --conf spark.ui.port=0 in Kali Linux. I verified Python3.7 is under /usr/bin and spark can access it. While running ...
Sourav Bhaumik's user avatar
0 votes
0 answers
85 views

What reasons could make psycopg2 mismatch a ca cert that datagrip accepts?

I want to make a python application that connects directly to the database. I got it to work with ssl required, but setting it to verify CA the connection fails. In datagrip, I checked the 'use ssl' ...
brian_wukong's user avatar
0 votes
0 answers
230 views

How to delete the _MEI file in C:\Windows\Temp generated by running the exe program packaged by python

I run multiple python-encapsulated exe programs on the server. After the environment resources of each program are released, there are about 20 G, which causes the C drive to be full. I try to delete ...
starhu's user avatar
  • 1
0 votes
0 answers
27 views

Cannot open file found by os.walk (python 3.7)

I am using os.walk to recursively search through a directory to find a file and parse it for data. Although os.walk is able to find the file, trying to open it yields a FileNotFoundError. It can find ...
crime-brulee's user avatar
0 votes
2 answers
36 views

Error when tryig to login to account with gd.py

I'm trying to login with this library of python. Here is code what I tried. Python import gd def _session_(username, password): try: client = gd.Client() client.login(username, ...
display_name's user avatar
0 votes
0 answers
70 views

How can I change the background color for every second column in Tkinter, treeview?

I need to change every second column's background color. columns = ('ID', 'type', 'name', 'CECQ code', 'QR code', 'location', 'placement', 'edition date', 'description', 'Check') listBox = Treeview(...
Marcin's user avatar
  • 1
0 votes
0 answers
78 views

NameError: name “x” is not defined

> import tkinter > import tkinter as tk > from tkinter import ttk > from tkinter import messagebox > import sqlite3 # CREEAREA APLICATIEI + CONFIGURAREA ACESTEIA root = tk.Tk() root....
Spravil Carina's user avatar
1 vote
1 answer
343 views

How to persist the charts I made through pygwalker?

I am using Pygwalker to create some charts for my analysis, but I am unable to save the charts I have created. Every time I reopen the notebook or refresh the notebook page, the charts I made before ...
Kytscho J.'s user avatar
0 votes
1 answer
31 views

One time load Word2Vec from Memory

I`m loading the Word2Vec models with the code below: model = gensim.models.KeyedVectors.load_word2vec_format('cc.en.300.vec',binary=False,encoding='utf8') return model.wv It takes over 10 minutes ...
Milad Xandi's user avatar
1 vote
1 answer
133 views

WinError 2 While installing smbus package via pip

While Installing smbus The Same error kept occuring which was [WinError 2] The system cannot find the file specified i am using python 3.7 and i am wondering why this error is occuring to install it i ...
Seán Moran's user avatar
1 vote
0 answers
84 views

How to resolve "The 'pip' distribution was not" when using pyenv on Mac

I'm attempting to install codalab worksheets cli. I have a Mac M2 machine, with a python version 3.10 installed through homebrew. I tried just pip installing the codalab package, but it didn't work ...
rel-s's user avatar
  • 6,108
0 votes
1 answer
61 views

Tkinter frame class using OOP not showing parameters e.g. background colour (bg="black etc.)

I am new to OOP with Tkinter but have made some applications implementing minimal OOP from Tkinter - the classic frame1 = Frame(root, bg="black") rather than using classes. I have tried many ...
TheOccupator's user avatar
1 vote
1 answer
1k views

Unable to import module 'lambda_function': cannot import name 'exceptions' from 'cryptography.hazmat.bindings._rust' (unknown location)

I have a python script generating a CSR from a CBOR. It works fine on device locally. But when I try making it a lambda function and executing it on AWS, I got an error message "Unable to import ...
tamptek's user avatar
  • 23
0 votes
1 answer
112 views

how to use Python multimethod with custom class as argument type

I have the following classes setup: class A: pass class B(A): pass class C(A): pass Then I have a method that gets called with 2 arguments: x -> always a string y -> one of the ...
KSS's user avatar
  • 157
0 votes
0 answers
27 views

KerasMXNet using Python 3.7 or 3.8

Our team is into deep learning and uses kerasmxnet (a really old and deprecated package: https://github.com/awslabs/keras-apache-mxnet). The package is today limiting us to Python 3.6 and I am trying ...
user2103008's user avatar
1 vote
0 answers
25 views

Can't start subprocess 'swriter' via button.clicked.connect, if any instance of swriter is already opened on local PC

I tried to open OpenOffice 'swriter' program via Subprocess in Python 3. If I try to run the subprocess via button.clicked.connect, it only works, if no instance of swriter is already active on my PC, ...
Andrej's user avatar
  • 11
0 votes
1 answer
501 views

python3-urllib3: disable SSL certificate checking

How can I disable SSL certificate checking in urllib3? My application uses urllib.request.Request: request = urllib.request.Request(url, data=data, headers=headers) but this function no longer ...
Martin Vegter's user avatar
0 votes
1 answer
52 views

How the ranges changing?

def summaryRanges(self, nums): ranges, r = [], [] for n in nums: if n-1 not in r: r = [] ranges += r, r[1:] = n, return ['->'.join(map(str, r)) ...
Mridulk Kaushik's user avatar
1 vote
1 answer
57 views

Why am I getting a key error with d.get() if that is supposed to be impossible?

I am using Python 3.7.0. When I run the following code, I get the error listed below: import requests url = f'https://statsapi.mlb.com/api/v1/schedule?sportId=1&hydrate=probablePitcher&...
Peter Ohaver's user avatar
0 votes
0 answers
355 views

Not able to upload file to sharepoint using python office365-REST-Python-Client python package

I have files in one in one of the path and wants to upload that into sharepoint folder but getting below error with multiple "another exception occurred". Traceback (most recent call last): ...
Suman's user avatar
  • 11
-1 votes
1 answer
44 views

Pandas dataframe difference in same column by date

I want to minus the data from 5 days ago. For example: Id:1, Date: 6/10/2023, Data: 22. Id:1, Date: 6/5/2023, Data: 15 Result: Id:1, Date: 6/10/2023, Data: 22, Diff: 7 Please see the image.
CaptainCrunch's user avatar
0 votes
0 answers
239 views

Why does Python Pdfkit's from_string method insert a blank first page into the pdf?

I'm currently attempting to render a pdf from a series of html files with Python pdfkit and PyPDF2. My goal is to render each html file into a single page with pdfkit before stitching them together ...
Matthew Wells's user avatar
0 votes
1 answer
1k views

community.postgresql.postgresql_query raises `Failed to import the required Python library (psycopg2) on YYY's Python XXX/ansible-venv/bin/python3.7`

I am running an Ansible playbook with virtual environment ansible_venv activated. My playbook get struck here collect data from DB localhost failed | msg: Failed to import the required Python ...
Tms91's user avatar
  • 3,580
3 votes
0 answers
511 views

Wheel fails for pyarrow installation

I am trying to install pyarrow on my raspberry pi but I keep running into "ERROR: Failed building wheel for pyarrow". The full story is: -- Found Python3: /usr/bin/python3 (found version &...
starsnpixel's user avatar
-2 votes
1 answer
114 views

getting TypeError: '<' not supported between instances of 'tuple' and 'int'

def c_convert(str_one, str_two): i=0, j=0 while i < len(str_one) and j < len(str_two): if str_one[i].upper() == str_two[j]: j +=1 i +=1 return j == ...
0xrajcode's user avatar

1
2 3 4 5
84