Trouble with using .events() in SWAN

Hi, I am new to SWAN and the coffea package. I kept having the same error when I use .events() to build NanoEvents.

The configuration I used was Python 96.

Does anyone know what might be causing the problem?

Dear Xiaohe,

I believe that’s rather a coffea-related question. If you don’t get a reply from anyone in this forum, I suggest that you contact coffea support.


Dear Enric,

Thank you for your suggestion! I am wondering if this problem could be caused by messing up some of the dependencies of the package. (The same code works in Google Colab or in any other platforms).

Is there a way to restore the packages in my CERNBox to the same as the default ones?

Thank you,

I actually found that, in the releases that are available to me (e.g. 96Python3 and 99), although they come with coffea, the versions of several dependencies of coffea do not meet the requirement.

e.g. coffea requires numba>= 0.50.0, numba in 96Python3 is 0.44.0.
uproot>=4.0.1, uproot in 99 is 3.10.12.

Thus, even though these releases come with coffea, I cannot use it as I wish.

I tried pip install --user --upgrade to update the dependencies, but I do not see the version changes after executing this command.

Is there a way to get around with this problem? Or am I not upgrading the packages properly?

Thank you,


What happens if you use coffea in the Bleeding Edge stack? That has the most recent versions of packages. afaik coffea was updated recently.

This looks like the issue nanoevents uproot mapping in coffea v0.7.15 needs update for changes in uproot v4.2.4 (.awkward_form method) · Issue #686 · CoffeaTeam/coffea · GitHub
The problem is that for uproot versions 4.2.4,4.3.0,4.3.1 there was a regression in one of the APIs. You should be able to upgrade uproot to 4.3.2 or newer to fix this error.

Thank you for your suggestion! The code can be run in Bleeding Edge, with some minor issues.

It finally works normally after I make sure all the versions of the dependencies meet the requirements of coffea.