brentvollebregt / auto-py-to-exe

Converts .py to .exe using a simple graphical interface
MIT License
3.93k stars 676 forks source link

error #358

Closed jsgaston closed 1 year ago

jsgaston commented 1 year ago

Quick Checks

Describe the bug I run the exe and this error appears, and after that the cmd closes.

To Reproduce Steps to reproduce the behavior: error

  1. Go to '...' the exe file, and run it
  2. Click on '....'
  3. Scroll down to '....'
  4. See error added

If you have example code, please provide a minimal reproducible example.

# libraries for webscraping, parsing and getting stock data
from urllib.request import urlopen, Request
from bs4 import BeautifulSoup
import yfinance as yf
import time

# for plotting and data manipulation
import pandas as pd
import matplotlib.pyplot as plt
import plotly
import plotly.express as px

# NLTK VADER for sentiment analysis
import nltk
from nltk import *
nltk.downloader.download('vader_lexicon')
from nltk.sentiment.vader import SentimentIntensityAnalyzer

# for getting current date and time to print 'last updated'
from datetime import datetime

# Get All Tickers from Dow Jones Index
df_dow_jones = pd.read_html("https://en.wikipedia.org/wiki/Dow_Jones_Industrial_Average")[1]
tickers = df_dow_jones['Symbol'].tolist()
print("tickers",tickers)
# Scrape the Date, Time and News Headlines Data
finwiz_url = 'https://finviz.com/quote.ashx?t='
news_tables = {}

Expected behavior again, error when running the executable

Screenshots (optional) image (that is what I see (error) when running the executable)

Your Environment:

Additional context (optional) Please help, I have many errors in the executable with lots of .py that don't get error when running.

brentvollebregt commented 1 year ago

Again, can you please provide a minimal reproducible example, I imagine a lot of your source code provided is not needed to reproduce the error.

Take a look at https://github.com/vaexio/vaex/issues/1823 - adding the hook hook-frozendict.py might help you fix your issue. I found this by searching "pyinstaller no such file or directory frozendict VERSION" in Google - they have a similar issue.

hook-frozendict.py:

from pathlib import Path
import frozendict

datas = [(Path(frozendict.__path__[0]) / 'VERSION', 'frozendict')]
jsgaston commented 1 year ago

it worked :)