No module named generate_dynamic


#1

I went to update the forge platform version and now I get this error message. Have tried shutting down, logging out etc but still the same thing… cant run my code…


#2

You’ll get that message if, for whatever reason, the support code for that platform version didn’t download properly.

Things to try:

  1. Go back to the original platform version and try do a rebuild.
  2. Check that it’s a valid version listed here: https://trigger.io/docs/current/api/release_notes.html
  3. See if the following directory exists: <appdir>/.template/generate_dynamic
  4. Try forcing a full command line rebuild with: forge build ios --full --nocache 1 -v

Please attach logs from 4. if you don’t have any luck.


#3

Still not working… here is the log

C:\web\wlapps\sw-app>forge build android --full --nocache 1 -v
[ INFO] Forge tools version 3.4.6
[ DEBUG] Checking for update zip…
[ DEBUG] Forge build tools version: 3.4.6
[ DEBUG] main: {“server”: “https://trigger.io/api/”}
[ DEBUG] port: 38394
[ DEBUG] GET https://trigger.io/api/v1/version_check/3/4/6/
[ DEBUG] Checking API response for success or error
[ INFO] Update result: you already have the latest tools
[ DEBUG] GET https://trigger.io/api/v1/auth/loggedin
[ DEBUG] Checking API response for success or error

This is the email address you used to sign up to trigger.io.
Username:

The password you use to login to trigger.io.
Password:
[ INFO] authenticating as “”
[ DEBUG] GET https://trigger.io/api/v1/auth/hello
[ DEBUG] Checking API response for success or error
[ DEBUG] POST https://trigger.io/api/v1/auth/verify
[ DEBUG] Checking API response for success or error
[ INFO] authentication successful
[ DEBUG] Full rebuild requested: removing previous templates
[ DEBUG] GET https://trigger.io/api/v1/app/3e0e7a6d6884430aba84e5cd3b08409e/should_fetch_core_instructions
[ DEBUG] Checking API response for success or error
[ DEBUG] Server requires rebuild: platform has changed for : vs. 1eb4eeb50471
[ INFO] Your Forge platform has been updated, downloading updated build instructions.
[ INFO] Fetching generation instructions for v2.5.1 into “c:\users\appdata\local\temp\forge-templates-9xewnk.template”
[ DEBUG] GET https://trigger.io/api/v1/platform/v2.5.1/core_instructions
[ DEBUG] Unzipping instructions.zip to .
[ INFO] Removing old templates if present
[ DEBUG] Removing .template
[ INFO] Using new templates
[ DEBUG] Moving c:\users\appdata\local\temp\forge-templates-9xewnk.template to .template
[ ERROR] Couldn’t import generation code: No module named generate_dynamic
[ DEBUG] Traceback (most recent call last):
File “C:\Users\AppData\Local\Trigger Toolkit\build-tools\forge\async.py”, line 106, in run
result = self._target(*self._args, **self._kwargs)
File “C:\Users\AppData\Local\Trigger Toolkit\build-tools\forge\main.py”, line 345, in development_build
manager.fetch_instructions()
File “C:\Users\AppData\Local\Trigger Toolkit\build-tools\forge\templates.py”, line 90, in fetch_instructions
import_generate_dynamic(do_reload=True)
File “C:\Users\AppData\Local\Trigger Toolkit\build-tools\forge\build.py”, line 53, in import_generate_dynamic
raise ForgeError(“Couldn’t import generation code: {0}”.format(e))
ForgeError: Couldn’t import generation code: No module named generate_dynamic


#4

Can you please try the above again with the latest stable forge platform version, v2.7.7 or our staging release v2.7.8?


#5

Hi Antoine,

I actually just deleted the .template directory, rebooted and then it started to work again… not sure why!

Thanks though