Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: NameError:
Post: RE: NameError:

I don't see 'add_row_data_by_cell_coordinate' in your code. So error is justified. you need to add (or import) function 'add_row_data_by_cell_coordinate'
Larz60+ General Coding Help 1 29 27 minutes ago
    Thread: replace and extract value
Post: RE: replace and extract value

try: from datetime import datetime Market_date = '2022-04-22 00:00:00:000' RunTime = '2022-04-20 16:20:28:000' format = '%Y-%m-%d %H:%M:%S' date = datetime.strptime(Market_date[:19], format) rtime ...
Larz60+ General Coding Help 2 64 30 minutes ago
    Thread: Read directory listing of files and parse out the highest number?
Post: RE: Read directory listing of files and parse out ...

Another approach: test conditions: directory in same path as script, named 'filedir' (you can change as needed) containing the following files: Output:igMess_9.csv igMess_10.csv igMess_11_.csv igMess_...
Larz60+ General Coding Help 5 104 1 hour ago
    Thread: store all variable values into list and insert to sql_summary table
Post: RE: store all variable values into list and insert...

This will create a class, albeit a simple one. import gzip import hashlib import sqlite3 import sys from module4 import insert_Records from module1 import Create_csv from module2 import chksum from...
Larz60+ General Coding Help 3 84 Today, 09:13 AM
    Thread: store all variable values into list and insert to sql_summary table
Post: RE: store all variable values into list and insert...

move all imports to top of script. You should use better (meaningful) names for your modules Code doesn't reflect what you state as goal (inserting into database, rather than querying same) not eno...
Larz60+ General Coding Help 3 84 Today, 02:01 AM
    Thread: make all text in Right to left alignment in tkinter widgets
Post: RE: make all text in Right to left alignment in tk...

see: https://stackoverflow.com/questions/2030...in-tkinter
Larz60+ General Coding Help 1 61 Yesterday, 06:42 PM
    Thread: Reading Data from JSON
Post: RE: Reading Data from JSON

This is untested, but should allow you to load and display contents import json from pathlib import Path import os #set path to same as script os.chdir(os.path.abspath(os.path.dirname(__file__))) h...
Larz60+ General Coding Help 2 80 Yesterday, 06:34 PM
    Thread: Create a function for writing to SQL data to csv
Post: RE: Create a function for writing to SQL data to c...

something like: def query_to_csv(query, csvfilename, conn): df = pd.read_sql(query, conn) df.to_csv(csvfilename)
Larz60+ General Coding Help 1 87 Sep-26-2022, 09:05 AM
    Thread: Replace Meson with PIP
Post: RE: Replace Meson with PIP

In order to use pip, the author must place package in PyPi.org
Larz60+ General Coding Help 4 144 Sep-23-2022, 09:35 PM
    Thread: writing data from Amazon Workspaces to CSV
Post: RE: writing data from Amazon Workspaces to CSV

In new code, change line 24 from: datawriter = csv.DictWriter(csvfile, fieldnames=fieldnames) to: datawriter = csv.DictWriter(fp, fieldnames=fieldnames)
Larz60+ News and Discussions 5 192 Sep-23-2022, 04:39 PM
    Thread: managing new windows
Post: RE: managing new windows

Is what you call the 'anchor button' actually the 'Click Here' button? If so, you need selenium to wait for css_selector: '#id3e'. or as an alternative, xpath: '//*[@id="id3e"]' to do so, you will ne...
Larz60+ General Coding Help 1 131 Sep-22-2022, 05:26 PM
    Thread: Several xml files to dataframe
Post: RE: Several xml files to dataframe

see https://pandas.pydata.org/docs/dev/refer...d_xml.html
Larz60+ General Coding Help 2 148 Sep-20-2022, 06:25 PM
    Thread: Transparent Canvas
Post: RE: Transparent Canvas

I thought that I had figured out a way to do this, but that was many years ago, and probably another graphics package. There is one link that claims it can be done on MS windows here: https://stackov...
Larz60+ GUI 7 219 Sep-20-2022, 06:23 PM
    Thread: Transparent Canvas
Post: RE: Transparent Canvas

You can set a canvas oval background to transparent (or any color) (according to the original (Jhohn Shipman) manual) here's the info from page 33 If you don't have a copy of this manual, get one her...
Larz60+ GUI 7 219 Sep-20-2022, 11:39 AM
    Thread: Remove tag several xml files
Post: RE: Remove tag several xml files

This may be of interest: https://stackoverflow.com/a/4681377
Larz60+ General Coding Help 5 177 Sep-19-2022, 06:14 PM
    Thread: WebDriver' object has no attribute 'find_element_by_css_selector
Post: RE: WebDriver' object has no attribute 'find_eleme...

I don't even see where you are using find_element_by_css_selector The following is the way I have done it successfully: element = self.browser.find_element(By.CSS_SELECTOR, "#txtCommonPageNo") and it...
Larz60+ General Coding Help 3 160 Sep-19-2022, 06:11 PM
    Thread: TypeError: 'NoneType' object is not subscriptable
Post: RE: TypeError: 'NoneType' object is not subscripta...

cristydavidd Wrote:The error is self-explanatory.The error traceback contains valuable information (including line numbers) that not only show where the error occurred, but also show what was processe...
Larz60+ General Coding Help 3 3,470 Sep-19-2022, 02:43 PM
    Thread: WebDriver' object has no attribute 'find_element_by_css_selector
Post: RE: WebDriver' object has no attribute 'find_eleme...

you will need to import 'By': from selenium.webdriver.common.by import By
Larz60+ General Coding Help 3 160 Sep-19-2022, 02:38 PM
    Thread: I use VsCode with Python and it currently won't let me run any code
Post: RE: I use VsCode with Python and it currently won'...

Also, read this post: https://python-forum.io/thread-12237.html
Larz60+ General Coding Help 2 156 Sep-18-2022, 08:42 PM
    Thread: pdfminer package: module isn't found
Post: RE: pdfminer package: module isn't found

I have seen numbers that state there are about 10 million python developers in the world. A large number of these will be using Ubuntu, without a hint of a python problem. I would suggest that you fi...
Larz60+ General Coding Help 25 669 Sep-18-2022, 08:40 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020