I am facing a weird `Exception message: unsupporte...
# general
r
I am facing a weird
Exception message: unsupported operand type(s) for |: 'set' and 'OrderedSet'
error when upgrading from
1.13
to either
1.14
or
1.15.dev
. I have a minimal reproducing example available here https://github.com/StephanErb/pexample/pull/2 that fails on Travis but works as expected locally. Any hint in which direction I should be digging?
r
Which of the pants commands happened to throw this?
r
./pants -ldebug fmt.isort :: -- --diff --check-only
r
I can’t think of anything obviously wrong at the moment, I’ll try to get a repro and take a look in about an hour 😞
It actually succeeds on my machine
Also, did the exception come with a trace?
Running it on this branch succeeds for me:
Copy code
$ git log master..head
commit af0acb1946bc88ab53cc1636feaa1e4879ebff84
Author: Stephan Erb <stephan.erb@blue-yonder.com>
Date:   Wed Mar 13 11:26:00 2019 +0100

    Enable debug messages

commit 5d81c1fc93b5621df1365d8c3072eb4b030646da
Author: Stephan Erb <stephan.erb@blue-yonder.com>
Date:   Wed Mar 13 11:13:05 2019 +0100

    Try the latest RC instead

commit 048d33f6e9cda941be91a4d29e3f67f2fb7caff2
Author: Stephan Erb <stephan.erb@blue-yonder.com>
Date:   Wed Mar 13 10:50:22 2019 +0100

    Update Pants to 1.14

commit 85ab2cba293f0423c857378a5c152898a44e2e32
Author: Stephan Erb <stephan.erb@blue-yonder.com>
Date:   Wed Mar 13 10:50:13 2019 +0100

    Ensure line length remains below 100 chars
A trace for the exception might give us more information to go on.
r
Yeah it is super weird that it also works on my box but travis is not so happy with it 🙂
r
So my first guess would be that travis installs different versions of your dependencies.
I’m not too familiar with python dep management, but does this message mean anything?
Could not locate requirements.txt. Override the install: key in your .travis.yml to install dependencies.
Also, if you’re interested in getting a repro with backtraces, you might want to try the travis docker images:
./build-support/docker/travis_ci*
r
The idea wit the travis image is a good hint. I will try this tonight and then report back here
r
Cool 🙂 let me know if you need help setting it up
s/me/this channel/
r
Copy code
+./pants -ldebug fmt.isort :: -- --diff --check-only
/home/travis/.cache/pants/setup/bootstrap-Linux-x86_64/1.15.0.dev3/local/lib/python2.7/site-packages/cryptography/hazmat/primitives/constant_time.py:26: CryptographyDeprecationWarning: Support for your Python version is deprecated. The next version of cryptography will remove support. Please upgrade to a 2.7.x release that supports hmac.compare_digest as soon as possible.
  utils.PersistentlyDeprecated2018,
DEBUG] Target alias resources has already been registered. Overwriting!
timestamp: 2019-03-13T19:45:26.918092
Exception caught: (exceptions.TypeError)
  File "/home/travis/.cache/pants/setup/bootstrap-Linux-x86_64/1.15.0.dev3/bin/pants", line 10, in <module>
    sys.exit(main())
  File "/home/travis/.cache/pants/setup/bootstrap-Linux-x86_64/1.15.0.dev3/local/lib/python2.7/site-packages/pants/bin/pants_loader.py", line 87, in main
    PantsLoader.run()
  File "/home/travis/.cache/pants/setup/bootstrap-Linux-x86_64/1.15.0.dev3/local/lib/python2.7/site-packages/pants/bin/pants_loader.py", line 83, in run
    cls.load_and_execute(entrypoint)
  File "/home/travis/.cache/pants/setup/bootstrap-Linux-x86_64/1.15.0.dev3/local/lib/python2.7/site-packages/pants/bin/pants_loader.py", line 76, in load_and_execute
    entrypoint_main()
  File "/home/travis/.cache/pants/setup/bootstrap-Linux-x86_64/1.15.0.dev3/local/lib/python2.7/site-packages/pants/bin/pants_exe.py", line 39, in main
    PantsRunner(exiter, start_time=start_time).run()
  File "/home/travis/.cache/pants/setup/bootstrap-Linux-x86_64/1.15.0.dev3/local/lib/python2.7/site-packages/pants/bin/pants_runner.py", line 59, in run
    options_bootstrapper=options_bootstrapper
  File "/home/travis/.cache/pants/setup/bootstrap-Linux-x86_64/1.15.0.dev3/local/lib/python2.7/site-packages/pants/bin/local_pants_runner.py", line 90, in create
    options_bootstrapper
  File "/home/travis/.cache/pants/setup/bootstrap-Linux-x86_64/1.15.0.dev3/local/lib/python2.7/site-packages/pants/bin/local_pants_runner.py", line 39, in parse_options
    options = OptionsInitializer.create(options_bootstrapper, build_config)
  File "/home/travis/.cache/pants/setup/bootstrap-Linux-x86_64/1.15.0.dev3/local/lib/python2.7/site-packages/pants/init/options_initializer.py", line 112, in create
    options = cls._construct_options(options_bootstrapper, build_configuration)
  File "/home/travis/.cache/pants/setup/bootstrap-Linux-x86_64/1.15.0.dev3/local/lib/python2.7/site-packages/pants/init/options_initializer.py", line 90, in _construct_options
    build_configuration.optionables() |
Exception message: unsupported operand type(s) for |: 'set' and 'OrderedSet'
I managed to extract the stacktrace https://travis-ci.org/StephanErb/pexample/jobs/505945937