Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Upload Files to Azure Storage Container
Post: RE: Upload Files to Azure Storage Container

(Dec-21-2023, 06:50 PM)deanhystad Wrote: According to azure documentation: Quote:A path name is composed of one or more path name components (directory or file name) separated by the forward-slash (...
phillyfa General Coding Help 6 694 Dec-21-2023, 07:24 PM
    Thread: Upload Files to Azure Storage Container
Post: RE: Upload Files to Azure Storage Container

These are the only two files in the directory. All characters in the name are valid: Error:Initializing AzureBlobFileUploader Uploading file - ibrtfnotesbatch00.csv Uploading file - ibrthnotesbatch0...
phillyfa General Coding Help 6 694 Dec-21-2023, 06:20 PM
    Thread: Upload Files to Azure Storage Container
Post: Upload Files to Azure Storage Container

Hello, I found the script online that uploads multiple JPG files. I changed it so I can upload multiple BLOB files, i.e.) csv, xls, etc. However, I am receiving the following error message when I r...
phillyfa General Coding Help 6 694 Dec-21-2023, 03:53 PM
    Thread: ValueError - Formatting issue when values enter thousands
Post: RE: ValueError - Formatting issue when values ente...

(Apr-20-2023, 11:17 AM)buran Wrote: Your string has thousands separator, so you need to strop that in order to convert to float: total_cost += float(cell_value[1:].replace(',', ''))That said, probab...
phillyfa General Coding Help 4 1,177 Apr-20-2023, 06:22 PM
    Thread: ValueError - Formatting issue when values enter thousands
Post: RE: ValueError - Formatting issue when values ente...

(Apr-20-2023, 08:01 AM)ibreeden Wrote: Please provide the complete error stack.Error:Enter billing month (MM): 03 Enter billing year (YYYY): 2023 Traceback (most recent call last): File "c:\python...
phillyfa General Coding Help 4 1,177 Apr-20-2023, 10:38 AM
    Thread: ValueError - Formatting issue when values enter thousands
Post: ValueError - Formatting issue when values enter th...

I am using the following code to retrieve costs from an Azure subscription. The 'Cost (USD)' data is returning a ValueError when the cost is in the thousands. Can anyone provide insight as to how th...
phillyfa General Coding Help 4 1,177 Apr-19-2023, 08:37 PM
    Thread: Format SQL Query Output
Post: Format SQL Query Output

I'm selecting data from a table and returning all records. However, the records are being returned with a blank space separator instead of a comma. Any idea how to return rows like the following: O...
phillyfa General Coding Help 2 4,053 Apr-21-2020, 07:23 PM
    Thread: Connect to SQL and Select using Two Functions
Post: RE: Connect to SQL and Select using Two Functions

This works, but I'd still like to make the attributes more dynamic by allowing user input for the values instead of inside the code execution. import pyodbc import csv import logging import sys clas...
phillyfa General Coding Help 7 3,480 Apr-10-2020, 07:25 PM
    Thread: Connect to SQL and Select using Two Functions
Post: RE: Connect to SQL and Select using Two Functions

This is what I have now after creating the class, but it's still not working: class SQLConnection(object): """Create a database connection and perform DML""" # Class variables server = '...
phillyfa General Coding Help 7 3,480 Apr-10-2020, 06:14 PM
    Thread: Connect to SQL and Select using Two Functions
Post: RE: Connect to SQL and Select using Two Functions

I'm trying to create the Class object, but I'm unsure how to pass the arguments compared to my function based code? import pyodbc import csv import logging import sys server = '' database = '' usern...
phillyfa General Coding Help 7 3,480 Apr-09-2020, 06:20 PM
    Thread: Connect to SQL and Select using Two Functions
Post: RE: Connect to SQL and Select using Two Functions

Thx, I'll check it out!
phillyfa General Coding Help 7 3,480 Apr-09-2020, 01:09 PM
    Thread: Connect to SQL and Select using Two Functions
Post: RE: Connect to SQL and Select using Two Functions

This returns what I want: import pyodbc import csv import logging import sys server = '' database = '' username = '' password = '' ''' Connect to the database by the given credentials ''' def conne...
phillyfa General Coding Help 7 3,480 Apr-08-2020, 07:14 PM
    Thread: Connect to SQL and Select using Two Functions
Post: Connect to SQL and Select using Two Functions

Hello, I'm toying around with Python and I have a basic program to connect to SQL Server and run various database statements. I'd like to start creating functions for each type of activity, like con...
phillyfa General Coding Help 7 3,480 Apr-08-2020, 01:00 PM
    Thread: Pass Arguments to Function
Post: RE: Pass Arguments to Function

You're right. It's actually working. Thx for the second set of eyes and sorry for the confusion!
phillyfa General Coding Help 2 2,026 Mar-27-2020, 12:05 PM
    Thread: Pass Arguments to Function
Post: Pass Arguments to Function

Hello, The following function creates a connection string to a SQL Server instance. I have another program where all the values are hard-coded into the connection string. However, I'm toying around...
phillyfa General Coding Help 2 2,026 Mar-26-2020, 07:21 PM
    Thread: Python Logging and Handling
Post: RE: Python Logging and Handling

I went with new style format as you stated: print("Error {}: {}".format(e.args[0], e.args[1]))Error:Error 08001: [08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or acce...
phillyfa General Coding Help 2 4,577 Mar-20-2020, 05:13 PM
    Thread: Python Logging and Handling
Post: Python Logging and Handling

Hello, I typically write small programs for Python and never attempted to use logging or exception handling. This is all new to me, but with this program I'm currently writing I would like to incorp...
phillyfa General Coding Help 2 4,577 Mar-20-2020, 02:43 PM
    Thread: Row Count
Post: RE: Row Count

I went with the enumerate() function. It worked. Thanks for your help!
phillyfa General Coding Help 3 2,268 Mar-19-2020, 02:39 PM
    Thread: Row Count
Post: Row Count

Hello, I'm trying to count the number of records returned by a SQL query. The program writes to a .csv file, but I would like to output to a logfile showing any errors and the number of records retu...
phillyfa General Coding Help 3 2,268 Mar-19-2020, 01:23 PM

User Panel Messages

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