Feb-16-2024, 08:47 AM
Hi all,
I am using PyInstaller to convert a python script to a windows exe file.
The python script is:
This works perfectly as a python script but when I convert to exe and run the file I get this error:
(-2147352567, 'Exception occurred.', (0, None, None, None, 0, -2147352565), None)
Any ideas please?
I am using PyInstaller to convert a python script to a windows exe file.
The python script is:
#!/usr/bin/python import requests import random import time import datetime from datetime import date import csv import sys import lxml.html import pandas as pd from bs4 import BeautifulSoup as bs import json import xlwings as xw import schedule import os symbol = "XAUUSD" file = 'C:\\Users\\Admin\\Desktop\\MyFxBookAPIData.xlsm' try: wb = xw.Book(file) sht1 = wb.sheets[0] sht1.copy(name = symbol) # copy the template to a new sheet sht1 = wb.sheets[symbol] cellA = sht1.range('A2') cellA.value = sht1.name except Exception as e: print(str(e)) time.sleep(60)
This works perfectly as a python script but when I convert to exe and run the file I get this error:
(-2147352567, 'Exception occurred.', (0, None, None, None, 0, -2147352565), None)
Any ideas please?