compas-dev / compas-dev/compas

`invoke build-ghuser-components` fails with `TypeError: Value cannot be null`

Open
#1,205 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
386
Forks
122
Avg merge
11d 46m
Merged PRs (30d)
1

Description

> This is not an issue with COMPAS or with the componentizer but opening it here for documentation in case this happens in the future.

Was getting the following error when attempting to compile GH components for on mac.

```
(compas_env) > compas_timber % invoke build-ghuser-components
Cloning into ‘/var/folders/v4/bctfcs8j0y970btp937_yfz80000gn/T/tmp4yc0cfg0actions.ghcomponentizer’...
Unhandled exception:
Traceback (most recent call last):
TypeError: Value cannot be null.
Parameter name: method
```

The problem turned out to be `ipy` invoking IronPython3 which was installed rather than IronPython2.7.

To solve this:
1. install IronPython2.7, if not already installed
2. create a small bash/zsh script which starts mono with the `ipy2.7` executable, depending on where it's installed it could look something like this:
`ipy2.7wrapper`
```bash
#!/bin/bash
exec /Library/Frameworks/Mono.framework/Versions/6.12.0/bin/mono /Library/Frameworks/IronPython.framework/Versions/2.7.12/bin/ipy.exe “$@”
```
3. now compile the components using `invoke build-ghuser-components -i ./ipy2.7wrapper`

Many thanks to @kiki007 for finding this issue and help finding the solution!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.