ModuleNotFoundError: No module named 'kivymd.stiffscroll' - pyinstaller

Possible solution:
Some suggest that this problem happens because the kivymd I installed is only on the terminal and not on my IDE (Pycharm)'s Python Interpreter. I'm not so sure about this because first, I pip install kivymd on my terminal and manually added the kivy package onto my IDE's Python interpreter. And because second, my IDE Python interpreter is at "/Desktop/CoinSnack4/venv/bin/python" and my kivymd is installed at "/Users/kienletrung/Desktop/CoinSnack4/venv" on my terminal (I found this by typing "echo $VIRTUAL_ENV" into the terminal).
Also, my program, when run with the IDE, runs fine. The error below only happens when I open the .exe file of it...
Hi please anyone could help with this my exe file is throwing up this error:
The answer in this Stackoverflow (No module named kivymd.effects when using pyinstaller)didn't work for me...
[INFO ] [Logger ] Record log in /Users/kienletrung/.kivy/logs/kivy_22-01-18_0.txt
[INFO ] [Kivy ] v2.0.0
[INFO ] [Kivy ] Installed at "/var/folders/g4/1xyrvs4j721f0tlsddrbxch00000gn/T/_MEI2YvYUa/kivy/__init__.pyc"
[INFO ] [Python ] v3.8.1 (v3.8.1:1b293b6006, Dec 18 2019, 14:08:53)
[Clang 6.0 (clang-600.0.57)]
[INFO ] [Python ] Interpreter at "/Users/kienletrung/Desktop/CoinSnack4/dist/financiaz"
[INFO ] [Factory ] 186 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_imageio, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored)
[INFO ] [KivyMD ] 0.104.2.dev0 (installed at "/var/folders/g4/1xyrvs4j721f0tlsddrbxch00000gn/T/_MEI2YvYUa/kivymd/__init__.pyc")
[INFO ] [Text ] Provider: sdl2
[INFO ] [Window ] Provider: sdl2
[INFO ] [GL ] Using the "OpenGL ES 2" graphics system
[INFO ] [GL ] Backend used <sdl2>
[INFO ] [GL ] OpenGL version <b'2.1 INTEL-14.7.18'>
[INFO ] [GL ] OpenGL vendor <b'Intel Inc.'>
[INFO ] [GL ] OpenGL renderer <b'Intel(R) HD Graphics 6000'>
[INFO ] [GL ] OpenGL parsed version: 2, 1
[INFO ] [GL ] Shading version <b'1.20'>
[INFO ] [GL ] Texture max size <16384>
[INFO ] [GL ] Texture max units <16>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[ERROR ]
Traceback (most recent call last):
File "kivy/lang/parser.py", line 472, in execute_directives
ModuleNotFoundError: No module named 'kivymd.stiffscroll'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "kivy/lang/parser.py", line 474, in execute_directives
ModuleNotFoundError: No module named 'kivymd.stiffscroll'
Traceback (most recent call last):
File "kivy/lang/parser.py", line 472, in execute_directives
ModuleNotFoundError: No module named 'kivymd.stiffscroll'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "kivy/lang/parser.py", line 474, in execute_directives
ModuleNotFoundError: No module named 'kivymd.stiffscroll'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 24, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "PyInstaller/loader/pyimod03_importers.py", line 540, in exec_module
File "kivymd/uix/datatables.py", line 54, in <module>
File "kivy/lang/builder.py", line 373, in load_string
File "kivy/lang/parser.py", line 402, in __init__
File "kivy/lang/parser.py", line 508, in parse
File "kivy/lang/parser.py", line 483, in execute_directives
kivy.lang.parser.ParserException: Parser: File "<inline>", line 3:
...
1:
2:#:import DEVICE_TYPE kivymd.material_resources.DEVICE_TYPE
>> 3:#:import StiffScrollEffect kivymd.stiffscroll.StiffScrollEffect
4:
5:
...
Unable to import package 'kivymd.stiffscroll.StiffScrollEffect'
[8390] Failed to execute script main
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
It seems that the error happens all because the database.py file in kivymd/uix/database.py can't make the code "#:import StiffScrollEffect kivymd.stiffscroll.StiffScrollEffect" works for some reason!
If it helps, this my spec file:
# -*- mode: python ; coding: utf-8 -*-
from kivymd import hooks_path as kivymd_hooks_path
block_cipher = None
#changes the '/Users/kienletrung/Desktop/CoinSnack_MiniIA/main.py' below to the
#path to the python python file of the whole project. change the #'/Users/kienletrung/Desktop/CoinSnack_MiniIA' below to the folder that holds the previous python file.
a = Analysis(['/Users/kienletrung/Desktop/FinanciazIA/main.py'],
pathex=['/Users/kienletrung/Desktop/FinanciazIA'],
binaries=[],
datas=[],
hiddenimports=["kivymd"],
hookspath=[kivymd_hooks_path],
runtime_hooks=[],
excludes=['_tkinter', 'Tkinter', 'enchant', 'twisted'],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
#adds other files that are not the main python file with the way below: (needs to change the #'/Users/kienletrung/Desktop/CoinSnack_MiniIA/main.kv' to the appropriate path to the file)
a.datas += [('main.kv', '/Users/kienletrung/Desktop/FinanciazIA/main.kv', 'DATA'), ('Financiaz.png', '/Users/kienletrung/Desktop/FinanciazIA/Financiaz.png', 'DATA')]
#needs to change '/Users/kienletrung/Desktop/CoinSnack_MiniIA' to the path that holds the data that I add in the above line. change the "coinsnack" name to appropriate app name.
exe = EXE(pyz, Tree('/Users/kienletrung/Desktop/FinanciazIA', 'Data'),
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='financiaz',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False )
app = BUNDLE(exe,
name='financiaz.app',
icon=None,
bundle_identifier=None)
I tried days and days but I still couldn't solve this problem... I would be forever grateful if you could help me.
Thank you so much!

pip uninstall kivymd
pip install https://github.com/kivymd/KivyMD/archive/master.zip

Related

Apache Airflow on Azure sqlalchemy Postgres SSL SYSCALL error: EOF detected

We deployed Apache Airflow 2.3.3 to Azure.
Webserver - Web App
Scheduler - ACI
Celery Worker - ACI
We were seeing errors on the Celery ACI console related to Postgres and Redis connection timeouts as below
[2022-09-22 18:55:50,650: WARNING/ForkPoolWorker-15] Failed operation _store_result. Retrying 2 more times.
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1803, in _execute_context
cursor, statement, parameters, context
File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 719, in do_execute
cursor.execute(statement, parameters)
psycopg2.DatabaseError: could not receive data from server: Connection timed out
SSL SYSCALL error: Connection timed out
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.7/site-packages/celery/backends/database/__init__.py", line 47, in _inner
return fun(*args, **kwargs)
File "/home/airflow/.local/lib/python3.7/site-packages/celery/backends/database/__init__.py", line 117, in _store_result
task = list(session.query(self.task_cls).filter(self.task_cls.task_id == task_id))
File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 2887, in __iter__
return self._iter().__iter__()
File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 2897, in _iter
execution_options={"_sa_orm_load_options": self.load_options},
File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/orm/session.py", line 1689, in execute
result = conn._execute_20(statement, params or {}, execution_options)
File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1614, in _execute_20
return meth(self, args_10style, kwargs_10style, execution_options)
File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/sql/elements.py", line 326, in _execute_on_connection
self, multiparams, params, execution_options
File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1491, in _execute_clauseelement
cache_hit=cache_hit,
File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1846, in _execute_context
e, statement, parameters, cursor, context
File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 2027, in _handle_dbapi_exception
sqlalchemy_exception, with_traceback=exc_info[2], from_=e
File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 207, in raise_
raise exception
File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1803, in _execute_context
cursor, statement, parameters, context
File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 719, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.DatabaseError: (psycopg2.DatabaseError) could not receive data from server: Connection timed out
SSL SYSCALL error: Connection timed out
[SQL: SELECT celery_taskmeta.id AS celery_taskmeta_id, celery_taskmeta.task_id AS celery_taskmeta_task_id, celery_taskmeta.status AS celery_taskmeta_status, celery_taskmeta.result AS celery_taskmeta_result, celery_taskmeta.date_done AS celery_taskmeta_date_done, celery_taskmeta.traceback AS celery_taskmeta_traceback
FROM celery_taskmeta
WHERE celery_taskmeta.task_id = %(task_id_1)s]
[parameters: {'task_id_1': 'c5f9f53c-8afe-4d67-8d3b-d7ad84875de1'}]
(Background on this error at: https://sqlalche.me/e/14/4xp6)
[2022-09-22 18:55:50,929: INFO/ForkPoolWorker-15] [c5f9f53c-8afe-4d67-8d3b-d7ad84875de1] Executing command in Celery: ['airflow', 'tasks', 'run', 'CS_ALERTING', 'CheckRunningTasks', 'scheduled__2022-09-22T18:00:00+00:00', '--local', '--subdir', 'DAGS_FOLDER/CS_ALERTING.py']
[2022-09-22 18:55:51,241: INFO/ForkPoolWorker-15] Filling up the DagBag from /opt/airflow/platform_pam/dags/CS_ALERTING.py
[2022-09-22 18:55:53,467: INFO/ForkPoolWorker-15] Running <TaskInstance: CS_ALERTING.CheckRunningTasks scheduled__2022-09-22T18:00:00+00:00 [queued]> on host localhost
[2022-09-22 18:55:58,304: INFO/ForkPoolWorker-15] Task airflow.executors.celery_executor.execute_command[c5f9f53c-8afe-4d67-8d3b-d7ad84875de1] succeeded in 960.1964174450004s: None
[2022-09-22 19:29:25,931: WARNING/MainProcess] consumer: Connection to broker lost. Trying to re-establish the connection...
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.7/site-packages/redis/connection.py", line 706, in send_packed_command
sendall(self._sock, item)
File "/home/airflow/.local/lib/python3.7/site-packages/redis/_compat.py", line 9, in sendall
return sock.sendall(*args, **kwargs)
File "/usr/local/lib/python3.7/ssl.py", line 1034, in sendall
v = self.send(byte_view[count:])
File "/usr/local/lib/python3.7/ssl.py", line 1003, in send
return self._sslobj.write(data)
TimeoutError: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.7/site-packages/celery/worker/consumer/consumer.py", line 332, in start
blueprint.start(self)
File "/home/airflow/.local/lib/python3.7/site-packages/celery/bootsteps.py", line 116, in start
step.start(parent)
File "/home/airflow/.local/lib/python3.7/site-packages/celery/worker/consumer/consumer.py", line 628, in start
c.loop(*c.loop_args())
File "/home/airflow/.local/lib/python3.7/site-packages/celery/worker/loops.py", line 97, in asynloop
next(loop)
File "/home/airflow/.local/lib/python3.7/site-packages/kombu/asynchronous/hub.py", line 301, in create_loop
poll_timeout = fire_timers(propagate=propagate) if scheduled else 1
File "/home/airflow/.local/lib/python3.7/site-packages/kombu/asynchronous/hub.py", line 143, in fire_timers
entry()
File "/home/airflow/.local/lib/python3.7/site-packages/kombu/asynchronous/timer.py", line 64, in __call__
return self.fun(*self.args, **self.kwargs)
File "/home/airflow/.local/lib/python3.7/site-packages/kombu/asynchronous/timer.py", line 126, in _reschedules
return fun(*args, **kwargs)
File "/home/airflow/.local/lib/python3.7/site-packages/kombu/transport/redis.py", line 557, in maybe_check_subclient_health
client.check_health()
File "/home/airflow/.local/lib/python3.7/site-packages/redis/client.py", line 3522, in check_health
check_health=False)
File "/home/airflow/.local/lib/python3.7/site-packages/redis/connection.py", line 726, in send_command
check_health=kwargs.get('check_health', True))
File "/home/airflow/.local/lib/python3.7/site-packages/redis/connection.py", line 718, in send_packed_command
(errno, errmsg))
redis.exceptions.ConnectionError: Error 110 while writing to socket. Connection timed out.
[2022-09-22 19:29:26,023: WARNING/MainProcess] /home/airflow/.local/lib/python3.7/site-packages/celery/worker/consumer/consumer.py:367: CPendingDeprecationWarning:
I referred the Airflow's documentation and found setting up database
We are modifying Airflow's docker image and adding a python file,
airflow.www.db_utils.db_config (This file is installed to site_packages) and defined the dictionary
keepalive_kwargs = {
"keepalives": 1,
"keepalives_idle": 30,
"keepalives_interval": 5,
"keepalives_count": 5,
}
Finally, we are setting
ENV AIRFLOW__DATABASE__SQL_ALCHEMY_CONNECT_ARGS="airflow.www.db_utils.db_config.keepalive_kwargs"
Unfortunately, the error stills persist. It will be great if someone helps me to resolve this issue.

Locust test started running, when packaging with PyInstaller

I created a test.py file, which holds the locust as a library example from the docs.
I then ran the command pyinstaller test.py \
The logs I received started fine:
206 INFO: PyInstaller: 4.9
206 INFO: Python: 3.10.5
212 INFO: Platform: Windows-10-10.0.19044-SP0
213 INFO: wrote C:\Users\Roey2\test.spec
215 INFO: UPX is not available.
219 INFO: Extending PYTHONPATH with paths
['C:\\Projects\\Test']
431 INFO: checking Analysis
431 INFO: Building Analysis because Analysis-00.toc is non existent
431 INFO: Initializing module dependency graph...
433 INFO: Caching module graph hooks...
441 INFO: Analyzing base_library.zip ...
3015 INFO: Processing pre-find module path hook distutils from 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-distutils.py'.
3016 INFO: distutils: retargeting to non-venv dir 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\lib'
3732 INFO: Caching module dependency graph...
3839 INFO: running Analysis Analysis-00.toc
3850 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by C:\Users\Roey2\AppData\Local\Programs\Python\Python310\python.exe
3969 INFO: Analyzing C:\Projects\Test\test.py
4486 INFO: Processing pre-find module path hook site from 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-site.py'.
4486 INFO: site: retargeting to fake-dir 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\PyInstaller\\fake-modules'
8619 INFO: Processing pre-safe import module hook urllib3.packages.six.moves from 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-urllib3.packages.six.moves.py'.
10258 INFO: Processing pre-safe import module hook six.moves from 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-six.moves.py'.
11821 INFO: Processing module hooks...
11821 INFO: Loading module hook 'hook-certifi.py' from 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
11825 INFO: Loading module hook 'hook-cryptography.py' from 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
12007 INFO: Loading module hook 'hook-jinja2.py' from 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
12007 INFO: Loading module hook 'hook-pycparser.py' from 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
12008 INFO: Loading module hook 'hook-zmq.py' from 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
12105 INFO: Loading module hook 'hook-difflib.py' from 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\PyInstaller\\hooks'...
12108 INFO: Loading module hook 'hook-distutils.py' from 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\PyInstaller\\hooks'...
12108 INFO: Loading module hook 'hook-distutils.util.py' from 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\PyInstaller\\hooks'...
12110 INFO: Loading module hook 'hook-encodings.py' from 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\PyInstaller\\hooks'...
12170 INFO: Loading module hook 'hook-gevent.py' from 'C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\Lib\\site-packages\\PyInstaller\\hooks'...
Then something weird happened, it started running the test. Seems the freeze failed when it tried to load gevent. When I tried using auto-py-to-exe, and added a hidden import for gevent, same error occurred.
Type Name # reqs # fails | Avg Min Max Med | req/s failures/s
--------|----------------------------------------------------------------------------|-------|-------------|-------|-------|-------|-------|--------|-----------
--------|----------------------------------------------------------------------------|-------|-------------|-------|-------|-------|-------|--------|-----------
Aggregated 0 0(0.00%) | 0 0 0 0 | 0.00 0.00
[2022-09-29 13:19:29,824] LAPTOP-93J7NJGB/INFO/locust.runners: Ramping to 1 users at a rate of 10.00 per second
[2022-09-29 13:19:29,825] LAPTOP-93J7NJGB/INFO/locust.runners: All users spawned: {"User": 1} (1 total users)
Type Name # reqs # fails | Avg Min Max Med | req/s failures/s
--------|----------------------------------------------------------------------------|-------|-------------|-------|-------|-------|-------|--------|-----------
GET /non-existing-path 1 1(100.00%) | 794 794 794 794 | 0.00 0.00
--------|----------------------------------------------------------------------------|-------|-------------|-------|-------|-------|-------|--------|-----------
Aggregated 1 1(100.00%) | 794 794 794 794 | 0.00 0.00
When 60 seconds passed, it timed out.
Traceback (most recent call last):
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Scripts\pyinstaller.exe\__main__.py", line 7, in <module>
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\__main__.py", line 124, in run
run_build(pyi_config, spec_file, **vars(args))
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\__main__.py", line 58, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\building\build_main.py", line 793, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\building\build_main.py", line 725, in build
exec(code, spec_namespace)
File "C:\Users\Roey2\test.spec", line 7, in <module>
a = Analysis(['C:\\Projects\\Test\\test.py'],
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\building\build_main.py", line 277, in __init__
self.__postinit__()
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\building\datastruct.py", line 155, in __postinit__
self.assemble()
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\building\build_main.py", line 445, in assemble
self.graph.process_post_graph_hooks(self)
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\depend\analysis.py", line 326, in process_post_graph_hooks
module_hook.post_graph(analysis)
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\depend\imphook.py", line 398, in post_graph
self._load_hook_module()
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\depend\imphook.py", line 361, in _load_hook_module
self._hook_module = importlib_load_source(self.hook_module_name, self.hook_filename)
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\compat.py", line 606, in importlib_load_source
return mod_loader.load_module()
File "<frozen importlib._bootstrap_external>", line 548, in _check_name_wrapper
File "<frozen importlib._bootstrap_external>", line 1063, in load_module
File "<frozen importlib._bootstrap_external>", line 888, in load_module
File "<frozen importlib._bootstrap>", line 290, in _load_module_shim
File "<frozen importlib._bootstrap>", line 719, in _load
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\hooks\hook-gevent.py", line 16, in <module>
datas, binaries, hiddenimports = collect_all(
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 1081, in collect_all
hiddenimports = collect_submodules(package_name, filter=filter_submodules)
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 564, in collect_submodules
names = exec_statement(
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 91, in exec_statement
return __exec_statement(statement, capture_stdout=True)
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 75, in __exec_statement
return __exec_python_cmd(cmd, capture_stdout=capture_stdout)
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 66, in __exec_python_cmd
txt = compat.exec_python(*cmd, env=pp_env)
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\compat.py", line 546, in exec_python
return exec_command(*cmdargs, **kwargs)
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\Lib\site-packages\PyInstaller\compat.py", line 332, in exec_command
out = proc.communicate(timeout=60)[0]
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1152, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
File "C:\Users\Roey2\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1528, in _communicate
raise TimeoutExpired(self.args, orig_timeout)
subprocess.TimeoutExpired: Command '('C:\\Users\\Roey2\\AppData\\Local\\Programs\\Python\\Python310\\python.exe', '-c', '\nimport sys\nimport pkgutil\nimport traceback\n\n# ``pkgutil.walk_packages`` does not walk subpackages of zipped files per https://bugs.python.org/issue14209.\n# This is a workaround.\ndef walk_packages(path=None, prefix=\'\', onerror=None):\n def seen(p, m={}):\n if p in m:\n return True\n m[p] = True\n\n for importer, name, ispkg in pkgutil.iter_modules(path, prefix):\n if not name.startswith(prefix):\n name = prefix + name\n yield importer, name, ispkg\n\n if ispkg:\n try:\n __import__(name)\n except ImportError:\n if onerror is not None:\n onerror(name)\n except Exception:\n if onerror is not None:\n onerror(name)\n else:\n traceback.print_exc(file=sys.stderr)\n print("collect_submodules: failed to import %r!" % name, file=sys.stderr)\n else:\n path = getattr(sys.modules[name], \'__path__\', None) or []\n\n # don\'t traverse path items we\'ve seen before\n path = [p for p in path if not seen(p)]\n\n # Use Py2 code here. It still works in Py3.\n for item in walk_packages(path, name+\'.\', onerror):\n yield item\n # This is the original Py3 code.\n #yield from walk_packages(path, name+\'.\', onerror)\n\nfor module_loader, name, ispkg in walk_packages([\'C:\\\\Users\\\\Roey2\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python310\\\\Lib\\\\site-packages\\\\gevent\'], \'gevent.\'):\n print(\'\\n$_pyi:\' + name + \'*\')\n')' timed out after 60 seconds
I have no idea where to even start. Is it PyInstaller not freezing correctly? Is it Gevent not cooporating? Is it locust that can't handle it? Is it my specific env? I saw the other question about PyInstaller, so maybe it's my env, but it was asked 2 years, and 6 python versions ago.
Any help appreciated.

Forbidden: An error occurred (403) when calling the HeadObject operation:

my ~/.aws/credentials looks like
[default]
aws_access_key_id = XYZ
aws_secret_access_key = ABC
[testing]
source_profile = default
role_arn = arn:aws:iam::54:role/ad
I add my remote like
dvc remote add --local -v myremote s3://bib-ds-models-testing/data/dvc-test
I have made my .dvc/config.local to look like
[‘remote “myremote”’]
url = s3://bib-ds-models-testing/data/dvc-test
access_key_id = XYZ
secret_access_key = ABC/h2hOsRcCIFqwYWV7eZaUq3gNmS
profile=‘testing’
credentialpath = /Users/nyt21/.aws/credentials
but still after running dvc push -r myremote I get
ERROR: unexpected error - Forbidden: An error occurred (403) when calling the HeadObject operation: Forbidden
** Update
here is the output of dvc push -v
2021-07-25 22:40:38,887 DEBUG: Check for update is enabled.
2021-07-25 22:40:39,022 DEBUG: Preparing to upload data to 's3://bib-ds-models-testing/data/dvc-test'
2021-07-25 22:40:39,022 DEBUG: Preparing to collect status from s3://bib-ds-models-testing/data/dvc-test
2021-07-25 22:40:39,022 DEBUG: Collecting information from local cache...
2021-07-25 22:40:39,022 DEBUG: Collecting information from remote cache...
2021-07-25 22:40:39,022 DEBUG: Matched '0' indexed hashes
2021-07-25 22:40:39,022 DEBUG: Querying 1 hashes via object_exists
2021-07-25 22:40:39,644 ERROR: unexpected error - Forbidden: An error occurred (403) when calling the HeadObject operation: Forbidden
------------------------------------------------------------
Traceback (most recent call last):
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/site-packages/s3fs/core.py", line 246, in _call_s3
out = await method(**additional_kwargs)
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/site-packages/aiobotocore/client.py", line 154, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (AccessDenied) when calling the ListObjectsV2 operation: Access Denied
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/site-packages/s3fs/core.py", line 1057, in _info
out = await self._simple_info(path)
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/site-packages/s3fs/core.py", line 970, in _simple_info
out = await self._call_s3(
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/site-packages/s3fs/core.py", line 265, in _call_s3
raise translate_boto_error(err)
PermissionError: Access Denied
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/site-packages/s3fs/core.py", line 246, in _call_s3
out = await method(**additional_kwargs)
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/site-packages/aiobotocore/client.py", line 154, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (403) when calling the HeadObject operation: Forbidden
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/site-packages/dvc/main.py", line 55, in main
ret = cmd.do_run()
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/site-packages/dvc/command/base.py", line 50, in do_run
return self.run()
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/site-packages/dvc/command/data_sync.py", line 57, in run
processed_files_count = self.repo.push(
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/site-packages/dvc/repo/__init__.py", line 51, in wrapper
return f(repo, *args, **kwargs)
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/site-packages/dvc/repo/push.py", line 44, in push
pushed += self.cloud.push(objs, jobs, remote=remote)
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/site-packages/dvc/data_cloud.py", line 79, in push
return remote_obj.push(
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/site-packages/dvc/remote/base.py", line 57, in wrapper
return f(obj, *args, **kwargs)
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/site-packages/dvc/remote/base.py", line 494, in push
ret = self._process(
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/site-packages/dvc/remote/base.py", line 351, in _process
dir_status, file_status, dir_contents = self._status(
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/site-packages/dvc/remote/base.py", line 195, in _status
self.hashes_exist(
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/site-packages/dvc/remote/base.py", line 145, in hashes_exist
return indexed_hashes + self.odb.hashes_exist(list(hashes), **kwargs)
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/site-packages/dvc/objects/db/base.py", line 438, in hashes_exist
remote_hashes = self.list_hashes_exists(hashes, jobs, name)
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/site-packages/dvc/objects/db/base.py", line 389, in list_hashes_exists
ret = list(itertools.compress(hashes, in_remote))
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/concurrent/futures/_base.py", line 619, in result_iterator
yield fs.pop().result()
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/concurrent/futures/_base.py", line 444, in result
return self.__get_result()
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
raise self._exception
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/site-packages/dvc/objects/db/base.py", line 380, in exists_with_progress
ret = self.fs.exists(path_info)
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/site-packages/dvc/fs/fsspec_wrapper.py", line 92, in exists
return self.fs.exists(self._with_bucket(path_info))
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/site-packages/fsspec/asyn.py", line 87, in wrapper
return sync(self.loop, func, *args, **kwargs)
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/site-packages/fsspec/asyn.py", line 68, in sync
raise result[0]
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/site-packages/fsspec/asyn.py", line 24, in _runner
result[0] = await coro
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/site-packages/s3fs/core.py", line 802, in _exists
await self._info(path, bucket, key, version_id=version_id)
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/site-packages/s3fs/core.py", line 1061, in _info
out = await self._version_aware_info(path, version_id)
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/site-packages/s3fs/core.py", line 1004, in _version_aware_info
out = await self._call_s3(
File "/Users/nyt21/opt/miniconda3/envs/dvc/lib/python3.8/site-packages/s3fs/core.py", line 265, in _call_s3
raise translate_boto_error(err)
PermissionError: Forbidden
------------------------------------------------------------
2021-07-25 22:40:39,712 DEBUG: Version info for developers:
DVC version: 2.5.4 (pip)
---------------------------------
Platform: Python 3.8.10 on macOS-10.16-x86_64-i386-64bit
Supports:
http (requests = 2.26.0),
https (requests = 2.26.0),
s3 (s3fs = 2021.6.1, boto3 = 1.18.6)
Cache types: reflink, hardlink, symlink
Cache directory: apfs on /dev/disk3s1s1
Caches: local
Remotes: s3
Workspace directory: apfs on /dev/disk3s1s1
Repo: dvc, git
Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help!
2021-07-25 22:40:39,713 DEBUG: Analytics is enabled.
2021-07-25 22:40:39,765 DEBUG: Trying to spawn '['daemon', '-q', 'analytics', '/var/folders/4x/xhm22wt16gl6m9nvkl9gllkc0000gn/T/tmpo86jdns5']'
2021-07-25 22:40:39,769 DEBUG: Spawned '['daemon', '-q', 'analytics', '/var/folders/4x/xhm22wt16gl6m9nvkl9gllkc0000gn/T/tmpo86jdns5']'
I can upload through python
import boto3
import os
import pickle
bucket_name = 'bib-ds-models-testing'
os.environ["AWS_PROFILE"] = "testing"
session = boto3.Session()
s3_client = boto3.client('s3')
s3_client.upload_file('/Users/nyt21/Devel/DVC/test/data/iris.csv',
'bib-ds-models-testing',
'data/dvc-test/my_iris.csv')
I don't use aws CLI but the following also gives an access deny !
aws s3 ls s3://bib-ds-models-testing/data/dvc-test
An error occurred (AccessDenied) when calling the ListObjectsV2
operation: Access Denied
but it works if I add --profile=testing
aws s3 ls s3://bib-ds-models-testing/data/dvc-test --profile=testing
PRE dvc-test/
just you know environment variable AWS_PROFILE is already set to 'testing'
UPDATE
I have tried both AWS_PROFILE='testing' and AWS_PROFILE=testing, neither of them worked.

Salt request timed out. The master is not responding

We've suddenly started receiving the error:
Salt request timed out. The master is not responding. If this error persists after verifying the master is up, worker_threads may need to be increased."
While this seems straight forward enough to fix, bumping the worker-thread count from 5 to 100 did not solve the problem. A command like salt "*" cmd.run 'echo "hello"' was successful while the same command put in a state file and called with salt "*" state.apply hello failed. Although today even the cmd.run call is failing.
We've tried a variety of remedies that we found suggested on this sight and others for similar problems with no success, specifically: clearing the cache, killing all jobs, deleting the /var/cache/salt/minion directory and restarting the minions, rebooting the master processor, deleting /var/cache/salt/master then stopping and restarting the salt-master, making sure that there weren't any stray processes still running when it was stopped.
We aren't running with a firewall and we've verified the ports are open and communicating (as evidenced by a successful cmd.run call)
Salt version on the master:
---> salt-master --versions-report
Salt Version:
Salt: 2016.11.3
Dependency Versions:
cffi: 0.8.6
cherrypy: 3.2.2
dateutil: 1.5
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.7.2
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: 0.21.1
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.8
mysql-python: Not Installed
pycparser: 2.14
pycrypto: 2.6.1
pygit2: Not Installed
Python: 2.7.5 (default, Oct 11 2015, 17:47:16)
python-gnupg: Not Installed
PyYAML: 3.10
PyZMQ: 15.3.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4
System Versions:
dist: redhat 7.2 Maipo
machine: x86_64
release: 3.10.0-327.el7.x86_64
system: Linux
version: Red Hat Enterprise Linux Server 7.2 Maipo
Salt version on the minion:
==>salt-minion --versions-report
Salt Version:
Salt: 2016.11.3
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 1.5
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.7.2
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: 0.21.1
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.8
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pygit2: Not Installed
Python: 2.7.5 (default, Aug 29 2016, 10:12:21)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 15.3.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4
System Versions:
dist: redhat 7.2 Maipo
machine: x86_64
release: 3.10.0-327.36.1.el7.x86_64
system: Linux
version: Red Hat Enterprise Linux Server 7.2 Maipo
I've created a simple state file as an example to show you the output we're seeing. I've intentionally X'd out the IP values and host names in the output.
---> cat hello.sls
say hi:
cmd.run:
- name: echo "hello"
Results when run on the master:
---> salt -l debug "*" state.apply hello
[DEBUG ] Reading configuration from /etc/salt/master
[DEBUG ] Using cached minion ID from /etc/salt/minion_id: xx.xx.xx
[DEBUG ] Missing configuration file: /root/.saltrc
[DEBUG ] Configuration file path: /etc/salt/master
[WARNING ] Insecure logging configuration detected! Sensitive data may be logged.
[DEBUG ] Reading configuration from /etc/salt/master
[DEBUG ] Using cached minion ID from /etc/salt/minion_id: xx.xx.xx
[DEBUG ] Missing configuration file: /root/.saltrc
[DEBUG ] MasterEvent PUB socket URI: /var/run/salt/master/master_event_pub.ipc
[DEBUG ] MasterEvent PULL socket URI: /var/run/salt/master/master_event_pull.ipc
[DEBUG ] Initializing new AsyncZeroMQReqChannel for ('/etc/salt/pki/master', 'xxx.xxx.xxx_master', 'tcp://xx.xx.xx.xx:4506', 'clear')
[DEBUG ] Initializing new IPCClient for path: /var/run/salt/master/master_event_pub.ipc
[DEBUG ] LazyLoaded local_cache.get_load
[DEBUG ] Reading minion list from /var/cache/salt/master/jobs/9f/e5c817cfcbf1eedb46f97566072a7a3a102bd7505af34a3d42f889bb189e27/.minions.p
[DEBUG ] get_iter_returns for jid 20170608110512021926 sent to set(['xxx.xxx', 'xxx.xxx']) will timeout at 11:05:17.037291
[DEBUG ] Checking whether jid 20170608110512021926 is still running
[DEBUG ] Initializing new AsyncZeroMQReqChannel for ('/etc/salt/pki/master', 'xxx.xxx.xxx_master', 'tcp://xx.xx.xx.xx:4506', 'clear')
[DEBUG ] Passing on saltutil error. This may be an error in saltclient. 'retcode'
[DEBUG ] Checking whether jid 20170608110512021926 is still running
[DEBUG ] Initializing new AsyncZeroMQReqChannel for ('/etc/salt/pki/master', 'xxx.xxx.xxx_master', 'tcp://xx.xx.xx.xx:4506', 'clear')
[DEBUG ] Passing on saltutil error. This may be an error in saltclient. 'retcode'
[DEBUG ] Checking whether jid 20170608110512021926 is still running
[DEBUG ] Initializing new AsyncZeroMQReqChannel for ('/etc/salt/pki/master', 'xxx.xxx.xxx_master', 'tcp://xx.xx.xx.xx:4506', 'clear')
[DEBUG ] SaltReqTimeoutError, retrying. (1/3)
[DEBUG ] SaltReqTimeoutError, retrying. (2/3)
[DEBUG ] SaltReqTimeoutError, retrying. (3/3)
[DEBUG ] LazyLoaded nested.output
Salt request timed out. The master is not responding. If this error persists after verifying the master is up, worker_threads may need to be increased.
Results when run on the minion:
==>salt-call -l debug state.apply hello
[DEBUG ] Reading configuration from /etc/salt/minion
[DEBUG ] Including configuration from '/etc/salt/minion.d/_schedule.conf'
[DEBUG ] Reading configuration from /etc/salt/minion.d/_schedule.conf
[DEBUG ] Using cached minion ID from /etc/salt/minion_id: xxx
[DEBUG ] Configuration file path: /etc/salt/minion
[WARNING ] Insecure logging configuration detected! Sensitive data may be logged.
[DEBUG ] Reading configuration from /etc/salt/minion
[DEBUG ] Including configuration from '/etc/salt/minion.d/_schedule.conf'
[DEBUG ] Reading configuration from /etc/salt/minion.d/_schedule.conf
[DEBUG ] Connecting to master. Attempt 1 of 1
[DEBUG ] Initializing new AsyncAuth for ('/etc/salt/pki/minion', 'xxx.xxx', 'tcp://xx.xx.xx.xx:4506')
[DEBUG ] Generated random reconnect delay between '1000ms' and '11000ms' (4260)
[DEBUG ] Setting zmq_reconnect_ivl to '4260ms'
[DEBUG ] Setting zmq_reconnect_ivl_max to '11000ms'
[DEBUG ] Initializing new AsyncZeroMQReqChannel for ('/etc/salt/pki/minion', 'xxx.xxx', 'tcp://xx.xx.xx.xx:4506', 'clear')
[DEBUG ] Decrypting the current master AES key
[DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[DEBUG ] SaltEvent PUB socket URI: /var/run/salt/minion/minion_event_64f68ad064_pub.ipc
[DEBUG ] SaltEvent PULL socket URI: /var/run/salt/minion/minion_event_64f68ad064_pull.ipc
[DEBUG ] Initializing new IPCClient for path: /var/run/salt/minion/minion_event_64f68ad064_pull.ipc
[DEBUG ] Sending event: tag = salt/auth/creds; data = {'_stamp': '2017-06-08T15:08:50.733104', 'creds': {'publish_port': 4505, 'aes': 'L/jKbh4rxM99DNrJeL6hCHTIqr4sztwZs8vqM5M9vVzOfaAe+BZrOWTFNQ87Pu7UA0T7YmGNcf0=', 'master_uri': 'tcp://xx.xx.xx.xx:4506'}, 'key': ('/etc/salt/pki/minion', 'xxx.xxx', 'tcp://xx.xx.xx.xx:4506')}
[DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[DEBUG ] Determining pillar cache
[DEBUG ] Initializing new AsyncZeroMQReqChannel for ('/etc/salt/pki/minion', 'xxx.xxx', 'tcp://xx.xx.xx.xx:4506', 'aes')
[DEBUG ] Initializing new AsyncAuth for ('/etc/salt/pki/minion', 'xxx.xxx', 'tcp://xx.xx.xx.xx:4506')
[DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[DEBUG ] LazyLoaded jinja.render
[DEBUG ] LazyLoaded yaml.render
[DEBUG ] LazyLoaded state.apply
[DEBUG ] LazyLoaded saltutil.is_running
[DEBUG ] LazyLoaded grains.get
[DEBUG ] Initializing new AsyncZeroMQReqChannel for ('/etc/salt/pki/minion', 'xxx.xxx', 'tcp://xx.xx.xx.xx:4506', 'aes')
[DEBUG ] Initializing new AsyncAuth for ('/etc/salt/pki/minion', 'xxx.xxx', 'tcp://xx.xx.xx.xx:4506')
[DEBUG ] SaltReqTimeoutError, retrying. (1/3)
[DEBUG ] SaltReqTimeoutError, retrying. (2/3)
[DEBUG ] SaltReqTimeoutError, retrying. (3/3)
[ERROR ] An un-handled exception was caught by salt's global exception handler:
SaltReqTimeoutError: Message timed out
Traceback (most recent call last):
File "/usr/bin/salt-call", line 11, in <module>
salt_call()
File "/usr/lib/python2.7/site-packages/salt/scripts.py", line 379, in salt_call
client.run()
File "/usr/lib/python2.7/site-packages/salt/cli/call.py", line 58, in run
caller.run()
File "/usr/lib/python2.7/site-packages/salt/cli/caller.py", line 134, in run
ret = self.call()
File "/usr/lib/python2.7/site-packages/salt/cli/caller.py", line 197, in call
ret['return'] = func(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/salt/modules/state.py", line 543, in apply_
return sls(mods, **kwargs)
File "/usr/lib/python2.7/site-packages/salt/modules/state.py", line 1002, in sls
mocked=kwargs.get('mock', False))
File "/usr/lib/python2.7/site-packages/salt/state.py", line 3526, in __init__
BaseHighState.__init__(self, opts)
File "/usr/lib/python2.7/site-packages/salt/state.py", line 2441, in __init__
self.opts = self.__gen_opts(opts)
File "/usr/lib/python2.7/site-packages/salt/state.py", line 2468, in __gen_opts
mopts = self.client.master_opts()
File "/usr/lib/python2.7/site-packages/salt/fileclient.py", line 1338, in master_opts
return self.channel.send(load)
File "/usr/lib/python2.7/site-packages/salt/utils/async.py", line 75, in wrap
ret = self._block_future(ret)
File "/usr/lib/python2.7/site-packages/salt/utils/async.py", line 85, in _block_future
return future.result()
File "/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 214, in result
raise_exc_info(self._exc_info)
File "/usr/lib64/python2.7/site-packages/tornado/gen.py", line 876, in run
yielded = self.gen.throw(*exc_info)
File "/usr/lib/python2.7/site-packages/salt/transport/zeromq.py", line 276, in send
ret = yield self._crypted_transfer(load, tries=tries, timeout=timeout, raw=raw)
File "/usr/lib64/python2.7/site-packages/tornado/gen.py", line 870, in run
value = future.result()
File "/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 214, in result
raise_exc_info(self._exc_info)
File "/usr/lib64/python2.7/site-packages/tornado/gen.py", line 876, in run
yielded = self.gen.throw(*exc_info)
File "/usr/lib/python2.7/site-packages/salt/transport/zeromq.py", line 244, in _crypted_transfer
ret = yield _do_transfer()
File "/usr/lib64/python2.7/site-packages/tornado/gen.py", line 870, in run
value = future.result()
File "/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 214, in result
raise_exc_info(self._exc_info)
File "/usr/lib64/python2.7/site-packages/tornado/gen.py", line 876, in run
yielded = self.gen.throw(*exc_info)
File "/usr/lib/python2.7/site-packages/salt/transport/zeromq.py", line 228, in _do_transfer
tries=tries,
File "/usr/lib64/python2.7/site-packages/tornado/gen.py", line 870, in run
value = future.result()
File "/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 214, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
SaltReqTimeoutError: Message timed out
Traceback (most recent call last):
File "/usr/bin/salt-call", line 11, in <module>
salt_call()
File "/usr/lib/python2.7/site-packages/salt/scripts.py", line 379, in salt_call
client.run()
File "/usr/lib/python2.7/site-packages/salt/cli/call.py", line 58, in run
caller.run()
File "/usr/lib/python2.7/site-packages/salt/cli/caller.py", line 134, in run
ret = self.call()
File "/usr/lib/python2.7/site-packages/salt/cli/caller.py", line 197, in call
ret['return'] = func(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/salt/modules/state.py", line 543, in apply_
return sls(mods, **kwargs)
File "/usr/lib/python2.7/site-packages/salt/modules/state.py", line 1002, in sls
mocked=kwargs.get('mock', False))
File "/usr/lib/python2.7/site-packages/salt/state.py", line 3526, in __init__
BaseHighState.__init__(self, opts)
File "/usr/lib/python2.7/site-packages/salt/state.py", line 2441, in __init__
self.opts = self.__gen_opts(opts)
File "/usr/lib/python2.7/site-packages/salt/state.py", line 2468, in __gen_opts
mopts = self.client.master_opts()
File "/usr/lib/python2.7/site-packages/salt/fileclient.py", line 1338, in master_opts
return self.channel.send(load)
File "/usr/lib/python2.7/site-packages/salt/utils/async.py", line 75, in wrap
ret = self._block_future(ret)
File "/usr/lib/python2.7/site-packages/salt/utils/async.py", line 85, in _block_future
return future.result()
File "/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 214, in result
raise_exc_info(self._exc_info)
File "/usr/lib64/python2.7/site-packages/tornado/gen.py", line 876, in run
yielded = self.gen.throw(*exc_info)
File "/usr/lib/python2.7/site-packages/salt/transport/zeromq.py", line 276, in send
ret = yield self._crypted_transfer(load, tries=tries, timeout=timeout, raw=raw)
File "/usr/lib64/python2.7/site-packages/tornado/gen.py", line 870, in run
value = future.result()
File "/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 214, in result
raise_exc_info(self._exc_info)
File "/usr/lib64/python2.7/site-packages/tornado/gen.py", line 876, in run
yielded = self.gen.throw(*exc_info)
File "/usr/lib/python2.7/site-packages/salt/transport/zeromq.py", line 244, in _crypted_transfer
ret = yield _do_transfer()
File "/usr/lib64/python2.7/site-packages/tornado/gen.py", line 870, in run
value = future.result()
File "/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 214, in result
raise_exc_info(self._exc_info)
File "/usr/lib64/python2.7/site-packages/tornado/gen.py", line 876, in run
yielded = self.gen.throw(*exc_info)
File "/usr/lib/python2.7/site-packages/salt/transport/zeromq.py", line 228, in _do_transfer
tries=tries,
File "/usr/lib64/python2.7/site-packages/tornado/gen.py", line 870, in run
value = future.result()
File "/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 214, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
salt.exceptions.SaltReqTimeoutError: Message timed out
Try removing salt and salt-minion from the minion. After that remove all files with .pyc extension from the directory ( directory which you use for your default python version ):
/usr/lib/python/site-packages/salt/*.pyc
After doing so reinstall the salt-minion. I hope this would solve your issue.

Master hostname: salt not found. Retrying in 30 seconds

I am trying to install salt stack while running the command
python C:\Python27\Scripts\salt-minion -c C:\salt\minion -l debug i am getting error message like Master hostname: salt not found. Retrying in 30 seconds
I am attaching my error report please find it
C:\salt>python C:\Python27\Scripts\salt-minion -c C:\salt\minion -l debug
WARNING: 'C:\\salt\\minion' directory does not exist.
[DEBUG ] Missing configuration file: C:\salt\minion\minion
[DEBUG ] Guessing ID. The id can be explicitly in set c:\salt\conf\minion
[INFO ] Found minion id from get_fqhostname(): HoroppaLabs
[ERROR ] Could not cache minion ID: [Errno 2] No such file or directory: 'c:\\
salt\\conf\\minion_id'
[DEBUG ] Configuration file path: c:\salt\conf\minion
[WARNING ] Failed to open log file, do you have permission to write to c:\salt\v
ar\log\salt\minion?
[INFO ] Setting up the Salt Minion "HoroppaLabs"
[DEBUG ] Created pidfile: c:\salt\var\run\salt-minion.pid
[WARNING ] You have a version of ZMQ less than ZMQ 3.2! There are known connecti
on keep-alive issues with ZMQ < 3.2 which may result in loss of contact with min
ions. Please upgrade your ZMQ!
[DEBUG ] Missing configuration file: c:\salt\conf\minion
[ERROR ] Unable to import Python wmi module, some core grains will be missing
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\salt\grains\core.py", line 50, in <module>
import wmi
ImportError: No module named wmi
[CRITICAL] Failed to load grains defined in grain file core.hwaddr_interfaces in
function <function hwaddr_interfaces at 0x00000000037AA048>, error:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\salt\loader.py", line 1127, in gen_grains
ret = fun()
File "C:\Python27\lib\site-packages\salt\grains\core.py", line 1180, in hwaddr
_interfaces
ifaces = salt.utils.network.interfaces()
File "C:\Python27\lib\site-packages\salt\utils\network.py", line 449, in inter
faces
return win_interfaces()
File "C:\Python27\lib\site-packages\salt\utils\network.py", line 402, in win_i
nterfaces
with salt.utils.winapi.Com():
AttributeError: 'module' object has no attribute 'winapi'
[CRITICAL] Failed to load grains defined in grain file core.ip6 in function <fun
ction ip6 at 0x00000000037A5EB8>, error:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\salt\loader.py", line 1127, in gen_grains
ret = fun()
File "C:\Python27\lib\site-packages\salt\grains\core.py", line 1129, in ip6
return {'ipv6': salt.utils.network.ip_addrs6(include_loopback=True)}
File "C:\Python27\lib\site-packages\salt\utils\network.py", line 577, in ip_ad
drs6
ifaces = interfaces()
File "C:\Python27\lib\site-packages\salt\utils\network.py", line 449, in inter
faces
return win_interfaces()
File "C:\Python27\lib\site-packages\salt\utils\network.py", line 402, in win_i
nterfaces
with salt.utils.winapi.Com():
AttributeError: 'module' object has no attribute 'winapi'
[CRITICAL] Failed to load grains defined in grain file core.ip4 in function <fun
ction ip4 at 0x00000000037A5DD8>, error:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\salt\loader.py", line 1127, in gen_grains
ret = fun()
File "C:\Python27\lib\site-packages\salt\grains\core.py", line 1102, in ip4
return {'ipv4': salt.utils.network.ip_addrs(include_loopback=True)}
File "C:\Python27\lib\site-packages\salt\utils\network.py", line 546, in ip_ad
drs
ifaces = interfaces()
File "C:\Python27\lib\site-packages\salt\utils\network.py", line 449, in inter
faces
return win_interfaces()
File "C:\Python27\lib\site-packages\salt\utils\network.py", line 402, in win_i
nterfaces
with salt.utils.winapi.Com():
AttributeError: 'module' object has no attribute 'winapi'
[CRITICAL] Failed to load grains defined in grain file core.ip_interfaces in fun
ction <function ip_interfaces at 0x00000000037A5F98>, error:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\salt\loader.py", line 1127, in gen_grains
ret = fun()
File "C:\Python27\lib\site-packages\salt\grains\core.py", line 1159, in ip_int
erfaces
ifaces = salt.utils.network.interfaces()
File "C:\Python27\lib\site-packages\salt\utils\network.py", line 449, in inter
faces
return win_interfaces()
File "C:\Python27\lib\site-packages\salt\utils\network.py", line 402, in win_i
nterfaces
with salt.utils.winapi.Com():
AttributeError: 'module' object has no attribute 'winapi'
[ERROR ] This master address: 'salt' was previously resolvable but now fails t
o resolve! The previously resolved ip addr will continue to be used
[WARNING ] Master hostname: salt not found. Retrying in 30 seconds
Did you use the Salt Windows installer found here? http://docs.saltstack.com/en/latest/topics/installation/windows.html
Once you've installed the Salt minion you can start up the minion in a terminal with elevated privileges like this:
c:\salt\salt-minion.exe -l debug -c c:\salt\conf
You'll want to modify c:\salt\conf\minion and set the "master" option to be the IP or hostname of your master.

Resources