All forge commands fail with Traceback (most recent call last): File "<string>", line 20, in <module>

All forge commands (ie forge package, forge build, forge run) produce the following error:

Example:
forge package ios
Traceback (most recent call last):
File “”, line 20, in
File “/Users/antoine/Projects/banjo-hat.hg.installers/pyinstaller-1.5.1/iu.py”, line 436, in importHook
File “/Users/antoine/Projects/banjo-hat.hg.installers/pyinstaller-1.5.1/iu.py”, line 524, in doimport
File “/Users/davidbal/Library/Trigger Toolkit/build-tools/forge/main.py”, line 19, in
from forge.remote import Remote
File “/Users/antoine/Projects/banjo-hat.hg.installers/pyinstaller-1.5.1/iu.py”, line 436, in importHook
File “/Users/antoine/Projects/banjo-hat.hg.installers/pyinstaller-1.5.1/iu.py”, line 524, in doimport
File “/Users/davidbal/Library/Trigger Toolkit/build-tools/forge/remote.py”, line 20, in
import requests
File “/Users/antoine/Projects/banjo-hat.hg.installers/pyinstaller-1.5.1/iu.py”, line 436, in importHook
File “/Users/antoine/Projects/banjo-hat.hg.installers/pyinstaller-1.5.1/iu.py”, line 524, in doimport
File “/Users/davidbal/Library/Trigger Toolkit/build-tools/forge-dependencies/requests/init.py”, line 43, in
import urllib3
File “/Users/antoine/Projects/banjo-hat.hg.installers/pyinstaller-1.5.1/iu.py”, line 436, in importHook
File “/Users/antoine/Projects/banjo-hat.hg.installers/pyinstaller-1.5.1/iu.py”, line 524, in doimport
File “/Users/davidbal/Library/Trigger Toolkit/build-tools/forge-dependencies/urllib3/init.py”, line 7, in
from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, connection_from_url
File “/Users/antoine/Projects/banjo-hat.hg.installers/pyinstaller-1.5.1/iu.py”, line 436, in importHook
File “/Users/antoine/Projects/banjo-hat.hg.installers/pyinstaller-1.5.1/iu.py”, line 524, in doimport
File “/Users/davidbal/Library/Trigger Toolkit/build-tools/forge-dependencies/urllib3/connectionpool.py”, line 11, in
from .exceptions import (
File “/Users/antoine/Projects/banjo-hat.hg.installers/pyinstaller-1.5.1/iu.py”, line 436, in importHook
File “/Users/antoine/Projects/banjo-hat.hg.installers/pyinstaller-1.5.1/iu.py”, line 524, in doimport
File “/Users/davidbal/Library/Trigger Toolkit/build-tools/forge-dependencies/urllib3/exceptions.py”, line 2, in
from .packages.six.moves.http_client import IncompleteRead as httplib_IncompleteRead
File “/Users/antoine/Projects/banjo-hat.hg.installers/pyinstaller-1.5.1/iu.py”, line 453, in importHook
KeyError: ‘packages’

Also, the TriggerToolkit won’t open.

Please advise.

This could be related to a recent Toolkit update that required a bump to some core dependencies. It’s possible that this broke older Toolkit installs.

Could you please try a fresh install of the Toolkit:

https://trigger.io/forge/toolkit/

Edit: One other thing to try:

Can you please also check that your app is on the latest platform_version: v2.8.6

I installed the latest Toolkit. I still get errors:

Davids-MBP:~ davidbal$ TriggerToolkit
[ DEBUG] Installed version is same as App version, using code from /Users/davidbal/Library/Trigger Toolkit
[ DEBUG] Changing workspace to /Users/davidbal/Library/Trigger Toolkit
Unhandled exception in Trigger Toolkit: ‘packages’
Traceback (most recent call last):
File “”, line 131, in main
File “/Users/antoine/Projects/banjo-hat.hg.installers/pyinstaller-1.5.1/iu.py”, line 436, in importHook
File “/Users/antoine/Projects/banjo-hat.hg.installers/pyinstaller-1.5.1/iu.py”, line 524, in doimport
File “/Users/davidbal/Library/Trigger Toolkit/trigger/web.py”, line 20, in
import requests
File “/Users/antoine/Projects/banjo-hat.hg.installers/pyinstaller-1.5.1/iu.py”, line 436, in importHook
File “/Users/antoine/Projects/banjo-hat.hg.installers/pyinstaller-1.5.1/iu.py”, line 524, in doimport
File “/Users/davidbal/Library/Trigger Toolkit/build-tools/forge-dependencies/requests/init.py”, line 43, in
import urllib3
File “/Users/antoine/Projects/banjo-hat.hg.installers/pyinstaller-1.5.1/iu.py”, line 436, in importHook
File “/Users/antoine/Projects/banjo-hat.hg.installers/pyinstaller-1.5.1/iu.py”, line 524, in doimport
File “/Users/davidbal/Library/Trigger Toolkit/build-tools/forge-dependencies/urllib3/init.py”, line 7, in
from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, connection_from_url
File “/Users/antoine/Projects/banjo-hat.hg.installers/pyinstaller-1.5.1/iu.py”, line 436, in importHook
File “/Users/antoine/Projects/banjo-hat.hg.installers/pyinstaller-1.5.1/iu.py”, line 524, in doimport
File “/Users/davidbal/Library/Trigger Toolkit/build-tools/forge-dependencies/urllib3/connectionpool.py”, line 11, in
from .exceptions import (
File “/Users/antoine/Projects/banjo-hat.hg.installers/pyinstaller-1.5.1/iu.py”, line 436, in importHook
File “/Users/antoine/Projects/banjo-hat.hg.installers/pyinstaller-1.5.1/iu.py”, line 524, in doimport
File “/Users/davidbal/Library/Trigger Toolkit/build-tools/forge-dependencies/urllib3/exceptions.py”, line 2, in
from .packages.six.moves.http_client import IncompleteRead as httplib_IncompleteRead
File “/Users/antoine/Projects/banjo-hat.hg.installers/pyinstaller-1.5.1/iu.py”, line 453, in importHook
KeyError: ‘packages’
Please contact support@trigger.io

Can you please try nuking the ~/Library/Trigger\ Toolkit directory before re-installing the latest:

rm -rf ~/Library/Trigger\ Toolkit

Maybe also a:

rm -rf /Applications/TriggerToolkit.app

…for good measure.

Yes, nuking the directory did the trick. Thanks for the help.

I spoke too soon. I still get an error from “forge package android”

2020-07-26 13:00:49,799 [ ERROR] Something went wrong that we didn’t expect:
2020-07-26 13:00:49,799 [ ERROR] [Errno 86] Bad CPU type in executable
2020-07-26 13:00:49,799 [ DEBUG] Traceback (most recent call last):
File “/Users/davidbal/Library/Trigger Toolkit/build-tools/forge/async.py”, line 106, in run
result = self._target(*self._args, **self._kwargs)
File “/Users/davidbal/Library/Trigger Toolkit/build-tools/forge/main.py”, line 498, in package
build_to_run=build_to_run,
File “/Users/davidbal/Workspace/angular-legacy/custom/creative-world/.template/generate_dynamic/customer_goals.py”, line 225, in package_app
build_to_run.run()
File “/Users/davidbal/Workspace/angular-legacy/custom/creative-world/.template/generate_dynamic/build.py”, line 347, in run
self._call_with_params(task_method, task_args)
File “/Users/davidbal/Workspace/angular-legacy/custom/creative-world/.template/generate_dynamic/build.py”, line 306, in _call_with_params
return method(self, *params)
File “/Users/davidbal/Workspace/angular-legacy/custom/creative-world/.template/generate_dynamic/android_tasks.py”, line 755, in package_android
create_apk(build, zipf_name, interactive=False)
File “/Users/davidbal/Workspace/angular-legacy/custom/creative-world/.template/generate_dynamic/android_tasks.py”, line 598, in create_apk
_align_apk(path_info, stage2, output_filename)
File “/Users/davidbal/Workspace/angular-legacy/custom/creative-world/.template/generate_dynamic/android_tasks.py”, line 472, in _align_apk
run_shell(*args)
File “/Users/davidbal/Workspace/angular-legacy/custom/creative-world/.template/generate_dynamic/module_dynamic/utils.py”, line 357, in run_shell
raise state.error
OSError: [Errno 86] Bad CPU type in executable

2020-07-26 13:00:49,799 [ ERROR] See /Users/davidbal/Workspace/angular-legacy/custom/creative-world/forge-error.log for more details
2020-07-26 13:00:49,799 [ ERROR] Please contact support@trigger.io

That’s Apple dropping support for 32bit, you probably have an older Android SDK somewhere in your path.

Check out: