I dont understand why pyrebase4 will not work after making exe with pyinstaller i give the path to the module but it give strange error i have been looking for 4 day's for solution but i dont seem to finde it.
i'm on windows 10 virtual machine 64bit
Is there sombody ho can help me to figure this out?
Thanks.
import schedule
import time
import os
import runpy
Traceback (most recent call last):
File "update.py", line 7, in
File "c:\users\win10\pycharmprojects\log\venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
exec(bytecode, module.dict)
File "venv\Lib\site-packages\pyrebase\pyrebase.py", line 14, in
ImportError: attempted relative import with no known parent package
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "update.py", line 9, in
File "c:\users\win10\pycharmprojects\log\venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
exec(bytecode, module.dict)
File "venv\Lib\site-packages\pyrebase\pyrebase.py", line 14, in
ImportError: attempted relative import with no known parent package
[2112] Failed to execute script update
Make sure these boxes are checked before submitting your issue:
[x] Check that your version of Python is 3.4+
[x] Check that you are on the newest version of Pyrebase
[x] Check that Email/password provider is enabled in your Firebase dashboard under Auth -> Sign In Method.
I dont understand why pyrebase4 will not work after making exe with pyinstaller i give the path to the module but it give strange error i have been looking for 4 day's for solution but i dont seem to finde it.
i'm on windows 10 virtual machine 64bit
Is there sombody ho can help me to figure this out?
Thanks.
import schedule import time import os import runpy
try: import pyrebase except ImportError: import pyrebase
config = {
}
def do_somthing():
def moveUpdate(): runpy.run_path(path_name='moveUpdate.py') print('is running...')
do_somthing()
def compare_file(): print('program running...')
schedule.every(5).seconds.do(compare_file)
while 1: schedule.run_pending() time.sleep(1)
schedule.every().day.at('18:00').do(subprocess.call("python3 main.py", shell=True))
My .spec file
-- mode: python ; coding: utf-8 --
block_cipher = None
a = Analysis(['update.py'], pathex=['C:\Users\win10\PycharmProjects\winlog', 'C:\Users\win10\PycharmProjects\winlog\venv\Lib\site-packages\schedule','C:\Users\win10\PycharmProjects\winlog\venv\Lib\site-packages\pyrebase'], binaries=[], datas=[], hiddenimports=['schedule','pyrebase'], hookspath=[], runtime_hooks=[], excludes=[], win_no_prefer_redirects=False, win_private_assemblies=False, cipher=block_cipher, noarchive=False) pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) exe = EXE(pyz, a.scripts, a.binaries, a.zipfiles, a.datas, [], name='update', debug=False, bootloader_ignore_signals=False, strip=False, upx=True, upx_exclude=[], runtime_tmpdir=None, console=True )
My error after running exe
Traceback (most recent call last): File "update.py", line 7, in
File "c:\users\win10\pycharmprojects\log\venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
exec(bytecode, module.dict)
File "venv\Lib\site-packages\pyrebase\pyrebase.py", line 14, in
ImportError: attempted relative import with no known parent package
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "update.py", line 9, in
File "c:\users\win10\pycharmprojects\log\venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
exec(bytecode, module.dict)
File "venv\Lib\site-packages\pyrebase\pyrebase.py", line 14, in
ImportError: attempted relative import with no known parent package
[2112] Failed to execute script update
Make sure these boxes are checked before submitting your issue: [x] Check that your version of Python is 3.4+ [x] Check that you are on the newest version of Pyrebase [x] Check that Email/password provider is enabled in your Firebase dashboard under Auth -> Sign In Method.