Skip to content
CCPEDIAby Unity Nodes
App Development

Exberry Integration Setup

9 posts421 views1 likesLast activity Nov 2021

  1. joaogasparOP

    Hello everyone,

    I’m trying to set up locally the daml-dit-integration-exberry project but i’m facing some issues.
    First i had to change the makefile and replace the use of non existent file “dabl-meta.yaml” by the existent one “dit-meta.yaml” so the “make all” command can work correctly.

    ${DIT_NAME}: dabl-meta.yaml Makefile ${PKG_FILES} ${SRC_FILES} requirements.txt
    	ddit build --force --integration
    

    Now and following this readme, I’m trying to execute the command

    DABL_INTEGRATION_TYPE_ID=com.projectdabl.integrations.exberry.integration ./dabl-integration-exberry-{VERSION}.dit
    

    But it is failing with the following stacktrace:

    DABL_INTEGRATION_TYPE_ID=com.projectdabl.integrations.exberry.integration ./dabl-integration-exberry-0.8.1.dit
    Traceback (most recent call last):
      File "/Users/joaogaspar/IdeaProjects/xbourse/daml-dit-integration-exberry/dabl-integration-exberry-0.8.1.dit/.bootstrap/pex/pex.py", line 477, in execute
      File "/Users/joaogaspar/IdeaProjects/xbourse/daml-dit-integration-exberry/dabl-integration-exberry-0.8.1.dit/.bootstrap/pex/pex.py", line 394, in _wrap_coverage
      File "/Users/joaogaspar/IdeaProjects/xbourse/daml-dit-integration-exberry/dabl-integration-exberry-0.8.1.dit/.bootstrap/pex/pex.py", line 425, in _wrap_profiling
      File "/Users/joaogaspar/IdeaProjects/xbourse/daml-dit-integration-exberry/dabl-integration-exberry-0.8.1.dit/.bootstrap/pex/pex.py", line 533, in _execute
      File "/Users/joaogaspar/IdeaProjects/xbourse/daml-dit-integration-exberry/dabl-integration-exberry-0.8.1.dit/.bootstrap/pex/pex.py", line 635, in execute_entry
      File "/Users/joaogaspar/IdeaProjects/xbourse/daml-dit-integration-exberry/dabl-integration-exberry-0.8.1.dit/.bootstrap/pex/pex.py", line 650, in execute_pkg_resources
      File "/Users/joaogaspar/IdeaProjects/xbourse/daml-dit-integration-exberry/dabl-integration-exberry-0.8.1.dit/.bootstrap/pex/vendor/_vendored/setuptools/pkg_resources/__init__.py", line 2481, in resolve
    ModuleNotFoundError: No module named 'daml_dit_if'
    

    Thanks

  2. alex.graham 1

    Hey joaogaspar,

    We’ve had a few updates to how integrations are built and run that don’t seem to have made it into the documentation or Makefile.

    To run the integration, please give this command a try:

    ddit run --party=Exchange com.projectdabl.integrations.exberry.integration
    

    I would also rename dabl-meta.yaml back to dit-meta.yaml and change dabl-meta.yaml to dit-meta.yaml in the Makefile.

    Please let me know if you have any other issues. I will update our repos to reflect these changes, thanks for pointing this out!

  3. joaogaspar

    Hey Alex,

    Thanks for the quick response.
    After executing the command you mentioned i got this:

      Building wheel for cryptography (PEP 517) ... error
      ERROR: Command errored out with exit status 1:
       command: /Users/joaogaspar/IdeaProjects/xbourse/daml-dit-integration-exberry/.ddit-venv/bin/python3.9 /Users/joaogaspar/IdeaProjects/xbourse/daml-dit-integration-exberry/.ddit-venv/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /var/folders/40/qf7k783j6psfh2wcbxtvvmkh0000gn/T/tmppzhybzpt
           cwd: /private/var/folders/40/qf7k783j6psfh2wcbxtvvmkh0000gn/T/pip-install-9s0lm90o/cryptography
      Complete output (170 lines):
    (...)
    
     error: can't find Rust compiler
    
      If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.
    
      To update pip, run:
    
          pip install --upgrade pip
    
      and then retry package installation.
    
      If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.
    
      This package requires Rust >=1.41.0.
      ----------------------------------------
      ERROR: Failed building wheel for cryptography
    

    My pip is updated so should I get rust? I’m asking because it’s not in the requirements.
    Thanks

  4. alex.graham

    That’s odd. Which version of OSX are you running? There should be a prebuilt wheel for the cryptography package that pip should fetch - for me, pip downloads cryptography-35.0.0-cp36-abi3-macosx_10_10_x86_64.whl. Are the other packages being downloaded or are they all built when you get that error?

  5. joaogaspar

    I’m already on Monterey 12.0.1.
    Attached there’s a file with the full log of the execution so you can check it .

    exberryIntegrationRun.log.zip (4.8 KB)

  6. alex.graham

    Thanks for sending the logs. Can you try running

    ./.ddit-venv/bin/pip install --upgrade pip
    

    from the integration’s directory, and then trying to run the integration again?

  7. alex.graham

    If that doesn’t fix it, please also try

    ./.ddit-venv/bin/pip3 install --upgrade pip
    
  8. joaogaspar

    Thanks for your effort Alex, but unfortunately it didn’t work.
    I’ve tried before running the integration and of course it didn’t work because the directory .ddit-venv still doesn’t exist. So i tried after running the integration and the previous error is thrown and i got this:

    joaogaspar@MacBook-Pro-de-Joao-IntellectEU2 daml-dit-integration-exberry % make start
    ddit run --party=Exchange com.projectdabl.integrations.exberry.integration
    2021-11-11T10:49:45+0000 [INFO] (ddit) Argument file found: int_args.yaml
    /Users/joaogaspar/IdeaProjects/xbourse/daml-dit-integration-exberry/.ddit-venv/bin/python3: Error while finding module specification for 'daml_dit_if.main' (ModuleNotFoundError: No module named 'daml_dit_if')
    

    Thanks.

  9. alex.graham

    I am going to look more into this, but in the meantime, I’ve uploaded my .ddit-venv if you want to extract it into your integration folder directly and give it a try: https://github.com/digital-asset/daml-dit-integration-exberry/files/7522020/ddit-venv.zip.