Git Product home page Git Product logo

Comments (7)

LSartore avatar LSartore commented on June 9, 2024

Thanks for reporting this issue.
The problem comes from the string encoding when writing in / reading from PyLie's database. A fix has been added to master which should solve the issue. Please let me know if it actually does.
Cheers,
Lohan

from pyrate.

TomSteu avatar TomSteu commented on June 9, 2024

Hi Lohan,

almost there, now it is down to a name error:

============================================================================

             PyR@TE version 3.0 released August 4th 2020

       L. Sartore,

       F. Lyonnet, I. Schienbein (version 2)
       and F.Staub, A.Wingerter (version 1)
    Please cite arXiv:2007.12700
    Also, please consider citing 1906.04625 when using the 3-loop results

============================================================================

Loading the YAML file: /home/tst/Projects/pyrate/models/SM.model ... Done.
Loading the model ... Traceback (most recent call last):
  File "./[email protected]", line 63, in <module>
    model = Model(yamlSettings, runSettings, idb)
  File "/home/tst/Projects/pyrate/src/Core/ModelsClass.py", line 61, in __init__
    self.getGaugegroups(settings, realBasis=self.realBasis)
  File "/home/tst/Projects/pyrate/src/Core/ModelsClass.py", line 410, in getGaugegroups
    self.gaugeGroups[gpName] = GaugeGroup(gpName, gp, self.idb)
  File "/home/tst/Projects/pyrate/src/Definitions/GaugeGroup.py", line 24, in __init__
    self.sName = idb.get(self.type, 'name')
  File "/home/tst/Projects/pyrate/src/PyLie/PyLieDB.py", line 529, in get
    ret = self.__getitem__((args, kwargs))
  File "/home/tst/Projects/pyrate/src/PyLie/PyLieDB.py", line 602, in __getitem__
    return self.readBasicInfo(algebra, objType)
  File "/home/tst/Projects/pyrate/src/PyLie/PyLieDB.py", line 684, in readBasicInfo
    return PyLieDB.parse(self.f[algebra.fn][item])
  File "/home/tst/Projects/pyrate/src/PyLie/PyLieDB.py", line 481, in parse
    return PyLieDB.parse(val[()], objType=objType)
  File "/home/tst/Projects/pyrate/src/PyLie/PyLieDB.py", line 497, in parse
    return PyLieDB.sympify(str(val, 'ASCII'))
  File "/home/tst/Projects/pyrate/src/PyLie/PyLieDB.py", line 458, in sympify
    return eval(expr)
  File "<string>", line 1, in <module>
NameError: name 'A1' is not defined

cheers,
Tom

from pyrate.

LSartore avatar LSartore commented on June 9, 2024

Hi Tom,

Could you please try the following things:

  • Reset PyLie's database, by deleting the file src/PyLie/PyLieDB.hd5f.gz
  • Run PyR@TE and see if you still get the error
  • If no errors are raised, try and download again the original PyLieDB.hd5f.gz file from master, and put it in src/PyLie/
  • See if you still get the error

I suspect that the database was somehow polluted due to the error you got. The 'A1' string which causes the new error should not be in bytes form, but rather be a simple string. The above steps should help understanding what is going on.
Thanks in advance.
Lohan

from pyrate.

TomSteu avatar TomSteu commented on June 9, 2024

Hi Lohan,

after deleting the .gz, I still get the same error. Of course, also nothing changes after replacing the regenerated database with the one from master again.

cheers,
Tom

from pyrate.

LSartore avatar LSartore commented on June 9, 2024

Hi Tom,

I believe that the error comes from changes made in the most recent releases of the h5py module. Please can you confirm that your h5py version is 3.0 or higher ? If yes, I would ask you to downgrade to 2.10 while I'm working on a compatibility fix.
Hopefully this will solve the issue !

Cheers,
Lohan

from pyrate.

TomSteu avatar TomSteu commented on June 9, 2024

Ah yes, I was at 3.1!

Downgrading to 2.10 has resolved the problem, no deletion of the database cache necessary. I suggest to make a note about this in the README.md.

Btw, I've seen that many python projects nowadays distribute a requirements.txt file that specifies all dependencies, and can be parsed by pip:

pip install -r requirements.txt

This could be useful in order to freeze dependency versions. Anyways, feel free to close this issue at will.

cheers,
Tom

from pyrate.

LSartore avatar LSartore commented on June 9, 2024

Thanks for the advice.
Anyways the issue is now solved in principle. Thanks again for reporting it!

from pyrate.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.