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.

Python 3.7 was released on June 27, 2018 (PEP 537).


Use this tag if your question is specifically related to Python 3.7. Otherwise, use the following guidelines to determine which tag(s) you should add to your question:

  • If your question applies to Python in general, use only the tag.
  • If your question applies to Python 3.x but not to Python 2.x, add the tag .
  • If you aren't sure, tag your question with and mention which version you're using in the post.

References

4167 questions
1
vote
1 answer

Python 3.7 About PEP 484 multiple type how to explain it?

def read_image(file): image = imread(file) return image in this case, i acept file is a path or a image array, how can I annotations for file? def read_image(file: str|array): is that possible? Update Now it works. following…
Frank Liao
  • 855
  • 1
  • 8
  • 25
1
vote
1 answer

Python importing from incorrect module (which bears the same name), VSC

I have two modules, both named connection.py in two separate environments listed below. Both of the folders containing connection.py are in my PYTHONPATH system environment variable. However, if that of spec is not placed above that of bvbot, spec's…
Dave
  • 424
  • 3
  • 14
1
vote
1 answer

cannot import name 'dataset' from 'netCDF4' (Windows)

I'm trying to read a netcdf file but it always shows the ImportError: cannot import name 'dataset' from 'netCDF4'. I have installed the netcdf4 using python using conda install netcdf4 and its have been successfully installed. At the same time I…
1
vote
2 answers

Python progress bar using tqdm

I have written the code below using tqdm module, but I am not getting the output in a single line. from tqdm import tqdm import time for i in tqdm(range(10)): print('Hello') time.sleep(3) 10%|█ | 1/10 [00:03<00:27, …
Nav
  • 143
  • 9
1
vote
3 answers

ModuleNotFoundError: No module named 'cartopy' when import SkewT from metpy.plots under Python3

When trying to import SkewT into my python3 code on a Mac (Mojave 10.14.6): from metpy.plots import SkewT I get the error: ModuleNotFoundError: No module named 'cartopy' pip3 install cartopy gives the output Collecting cartopy Downloading…
Janine
  • 13
  • 2
  • 7
1
vote
1 answer

yara-python cannot be imported to AWS Lambda

I'm trying to import the yara library into an AWS Lambda function but I am consistently given the following error: module initialization error: /var/lang/lib/libyara.so: cannot open shared object file: No such file or directory I have tried adding…
1
vote
1 answer

How to use sctpsocket_udp class in pysctp library

I am attempting to set up a basic SCTP client/server example using the pysctp library. I would like to use the sctp.sctpsocket_udp class since according to the relevant doc strings: A UDP-style SCTP socket can hold several associations via a single…
pooley1994
  • 723
  • 4
  • 16
1
vote
0 answers

NoReverseMatch error from Python Tutorial

Django Tutorial part 4 I am getting a NoReverseMatch at /polls/1/ NoReverseMatch at /polls/1/ Reverse for 'polls.index' not found. 'polls.index' is not a valid view In template /var/www/html/django_app/polls/templates/polls/detail.html, error at…
2hawks
  • 11
  • 2
1
vote
0 answers

Cannot find module PIL in Python

I am using: Thonny Version 3.2.1 Python Version 3.7.0 PIP Version 19.2.3 Pillow Version 6.1.0 I am trying to import an image into my program and show it on the screen with the below code: I get the error: ModuleNotFoundError: No module named…
1
vote
1 answer

How to append dynamic dropdownlist from JSON multi-dimension

How to append dropdownlist from json multi-dimension append showtext and value. ShowText = DId Value = LocId from functools import partial from tkinter import * from tkinter import messagebox def ShowValue(val) : …
Peter.N
  • 15
  • 4
1
vote
1 answer

Calculating Root-Mean-Square of pandas dataframe column

I have 50 residual values that are in the format 00:00:00.0000 under df['Residuals'] but hold actual values in a Pandas dataframe columns such as: 00:00:04.7328 00:00:01.4252 and so on. I want to calculate the rms value of these times in seconds but…
nf95
  • 23
  • 4
1
vote
2 answers

When testing my aws lambda getting error:- "Unable to import module 'app': No module named 'pyodbc'",

pyodbc is included in zip but still giving error when trying to test the lambda function. Installed pyodbc using pip3 and included the lib file while creating the lambda zip. import logging import rds_config import pyodbc # import requests #rds…
dkm007
  • 145
  • 2
  • 6
1
vote
1 answer

Converting Timedelta from a Pandas Dataframe to a seconds value

I have a column in a pandas.DataFrame titled Residuals and it is in a timedelta format (00:00:01.14611 for example). I have 47 of those listed values in the Residuals column and I need to convert them all back to just a seconds value (i.e. 1.14611).…
nf95
  • 23
  • 4
1
vote
1 answer

Get an iterable generator from an async generator

I have an async generator that I'm trying to pass into a keras model fit_generator, but the async generator returns an object, not a generator. I've tried googling, but I haven't found a solution. This seems to be a pretty specific problem.
1
vote
0 answers

How to parse XML/XLIFF with HTML entities in Python 3.7

I have following example code example.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- import xml.etree.ElementTree as ET xliff = '''
Xesenix
  • 2,418
  • 15
  • 30
1 2 3
99
100