i have an output from telethon GetContactsRequest, like this (to be shorted, i limited contacts to 2): Contacts(contacts=[Contact(user_id=123456789, mutual=True), Contact(user_id=987654321, mutual=True)], users=[User(id=123456789, contact=True, etc=123), User(id=987654321, contact=True, etc=123)] ) in my head i have 2 named lists inside a list (i’m new to telethon and python and its hard to explain more) in my code i ..

Read more

To Accomplish : watermarked video Process Followed : Create a models.py with user, video_file, upload_date fields Create a forms.py to accept video_file with validations Lastly views.py to link file and process watermark process while uploading the video. Here is my views.py def upload_video(request): if request.method == "POST": form = VideoUploaderForm( data = request.POST, files = ..

Read more

import json class Errors: bus_id = 0 stop_id = 0 stop_name = 0 next_stop = 0 stop_type = 0 a_time = 0 def convert_json_string(json_string): return json.loads(json_string) def check_data_types(python_object_from_json): for record in python_object_from_json: for field in record: if not field: pass I need a hand here. So what I wanna know is how can I access ..

Read more

Trying hit this endpoint via the docs below https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads/account-structure/create-and-manage-account-users But getting a b'{"serviceErrorCode":0,"message":"Invalid query parameters passed to request","status":400}’ My variable is url = ‘https://api.linkedin.com/v2/adAccountUsersV2?q=urn:li:FirstName Lastname:ABCx26W694’ Is it because my name has a space? Is that not the correct format for authenticatedUser? Source: Python..

Read more

I am trying to update the tags for members of a MailChimp list using the mailchimp3 package/API on a regular basis using purchase data from an external source. The tags need to be updated weekly based on recent purchases by customers. Sample data is below: original_contacts = pd.DataFrame{‘First Name’: {0: ‘Michael’, 1: ‘James’, 2: ‘Josephine’, ..

Read more

With python (I am using 2.4 and 2.7) I’d need to "exec" a string statement like : with these preexisting global strings say a, b a="1" b="2" from the interactive shell : exec(if (a < b) :n c=3) ^ SyntaxError: invalid syntax this works with double quotes around the entire statement : exec("if (a < ..

Read more

While executing a script in Python, we are getting error "ghostscript._gsprint.GhostscriptError: Fatal" Detailed here: Traceback (most recent call last): File "<path to main PY File>", line 296, in <module> pdf2JPG(folderLocation+"/"+f_name,intFiles,jpgfoldername,144) File "<path to PY file for PDF to JPG Functions>", line 146, in pdf2JPG with ghostscript.Ghostscript(*args) as g: File "C:Program Files (x86)Python38-32libsite-packagesghostscript__init__.py", line 171, in ..

Read more