Actually I'm trying to make a local search engine .The code works fine when running in pycharm but after created exe file using pyinstaller with options like --hidden-import=Tkinter --windowed, while try to execute the exe file it shows error like this
D:\untitled\tk\dist\scroll>scroll.exe Traceback (most recent call
last): File "scroll.py", line 28, in ImportError: No module
named Tkinter
Traceback (most recent call last): File "scroll.py", line 219, in
NameError: name 'Frame' is not defined Failed to execute
script scroll
D:\untitled\tk\dist\scroll>
The code written in python 2.7 is attached below I've also tried with python 3 but same problem
http://pastebin.com/4XWfcnzf
Related
everytime i build my app using pyinstaller, i had already put an icon in my python version except that when i run the .exe version i get this message :
Traceback (most recent call last):
File "main.py", line 174, in
File "tkinter_init_.py", line 2136, in wm_iconbitmap
_tkinter.TclError: bitmap "C:\Users\rayan\PycharmProjects\pythonProject\dist\main\dna.ico" not defined
i tried to import the icon using --icon=dna.ico but still nothing
any help please ?
I am trying to make a program using PySimpleGUI and whenever I run it as a .py (Python) file I get 0 errors and it runs exactly how I want it to, but when I use pyinstaller to compile the .py file to an EXE I get this error:
Traceback (most recent call last):
File "guitest.py", line 2, in <module>
ModuleNotFoundError: No module named 'PySimpleGUI'
[14792] Failed to execute script guitest
I am not sure why it is saying that, I have it installed. As I said before as long as it's a .py file it runs perfectly.
Find the following error showed in
"Traceback (most recent call last):
File "<input>", line 1, in <module>
ImportError: cannot import name 'Employee'"
I found the solution
Actually i just need to rerun the python console from pycharm
I've been trying to get this to work for a while and this error means I have made 'progress'. I'm using Python2.7 and Pygame.
UPDATE:
I fixed this issue by changing File to sys.argv[0]
C:\Python27\dist>Space_Badgers.exe
Traceback (most recent call last):
File "Space_Badgers.py", line 16, in <module>
NameError: name '__file__' is not defined
#This is the code its referring to:
img_dir = path.join(path.dirname(__file__), "img")
Please help, I wouldn't have guessed converting to exe would be so difficult.
Though, I am still new to programming.
UPDATE:
C:\Python27\dist>Space_Badgers.exe
Traceback (most recent call last):
File "Space_Badgers.py", line 163, in <module>
pygame.error: Couldn't open img\10121.png
This is my new issue.
It still runs fine in IDLE.
I need to execute this python script: http://superjared.com/static/code/googleMX.py
I installed pyactiveresource, but when I executed it: python googleMX.py I had this response.
Traceback (most recent call last):
File "googleMX.py", line 15, in ?
from pyactiveresource import ActiveResource
ImportError: cannot import name ActiveResource
by Responding myself...
It was using an older version of pyactiveresource. The author (Lucky) creates another one http://gist.github.com/330832