Comments (14)
Hi @rappoccio,
thanks for the report.
Could you check which PyYAML version you are using?
(Run pip show PyYAML
in a terminal and copy the output).
Thanks
from hepdata_lib.
It's 4.1
Name: PyYAML
Version: 4.1
Summary: YAML parser and emitter for Python
Home-page: https://github.com/yaml/pyyaml
Author: Kirill Simonov
Author-email: [email protected]
License: MIT
Location: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
Requires:
Required-by: hepdata-lib
from hepdata_lib.
Ok, that is the problem. I can reproduce your problem if I install 4.1
. I was previously running with 3.12
, which worked fine. So if you want to have a quick workaround, you can try downgrading to 3.12
.
As a way forward, I would propose to figure out what the right syntax for what we want to do is in 4.1, use that syntax, and update the setup requirements to make sure that at least this version is installed.
from hepdata_lib.
Aha, thanks for the quick checks! I can dig into this at some point soon if you don't get around to it.
from hepdata_lib.
@rappoccio If you want to take a look, that would be very welcome! The technical issue here is that we want the yaml
package to be able to dump our default_dict
just as it would usually be able to dump a normal python dict
. I expect this to be reasonably straightforward to fix. Please assign the issue to yourself once you start working on it to keep track of what's going on. Otherwise @clelange or I will look into it.
from hepdata_lib.
When I get around to it I will put the assignment in.
from hepdata_lib.
For which command in the notebook does this error show? I think we can fix it by using either @staticmethod
or @classmethod
as discussed at https://stackoverflow.com/questions/40701142/typeerror-unbound-method-must-be-called-with-instance-as-first-argument-got-in/40701173
I'll look into it.
from hepdata_lib.
It happens any time we use yaml.dump
to dump our defaultdict
s.
from hepdata_lib.
If we end up switching pyyaml versions, we should revisit #18
from hepdata_lib.
Hmm, so the offender seems to be https://github.com/clelange/hepdata_lib/blob/master/hepdata_lib/__init__.py#L18
I've created a new branch (https://github.com/clelange/hepdata_lib/tree/test_yaml_dump) with a couple of additional tests and forcing PyYAML to version 4.1, but I cannot reproduce the error. Can one of you take it from here?
from hepdata_lib.
I still see the error here. Running out of battery though so can't debug right now haha.
from hepdata_lib.
Should be fixed in master now. @rappoccio please report if you encounter any more issues.
from hepdata_lib.
Thanks!
from hepdata_lib.
New version 0.2.2 is available on PyPI: https://pypi.org/project/hepdata_lib/
from hepdata_lib.
Related Issues (20)
- Refactor RootFileReader.retrieve_object
- submission.create_files() fails and wipes the directory clean HOT 7
- Make directory cleanup more robust HOT 2
- CMSSW setup instructions broken for CMSSW_12_X_Y and later
- Add docs for `add_additional_resource` and support `type` argument HOT 1
- Support reading arrays in C files using cfilereader
- Test all supported Python versions
- Change Zenodo record added to Submission to Concept DOI
- Drop Python 2 support HOT 3
- Yank broken Python 2 releases from PyPI with Python 3 only hepdata-validator dependencies HOT 3
- Current SWAN defaults are incompatible HOT 3
- Update readthedocs config
- Reporting a vulnerability HOT 1
- Add ability to read in YODA files HOT 10
- Pip(3) version is outdated HOT 2
- Upgrade Pylint to allow use with Python 3.11
- Add ability to specify license information HOT 2
- Allow dummy uncertainties for variable member with dummy (string) value HOT 4
- Upgrade to codecov/codecov-action@v4
- Possible workspace.json file submission + symerrors submission HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hepdata_lib.