Git Product home page Git Product logo

Comments (12)

nochtli avatar nochtli commented on August 17, 2024 10

Got it working by adding the following method to class Version defined in yotta/lib/version.py:

    def truncate(self, level):
        return self.version.truncate(level)

from yotta.

thegecko avatar thegecko commented on August 17, 2024

It's likely the python version is too new

from yotta.

WillSewell avatar WillSewell commented on August 17, 2024

Thanks for the suggestion. I tried 3.6.9, 3.5.7. and 3.4.10 but unfortunately I get the same error.

from yotta.

Mac898 avatar Mac898 commented on August 17, 2024

Hi, I am experiencing the exact same issue. Just wondering if there are any more details I can provide to try and help with this. I have tried with python 3.8, 3.7, 3.6, 3.5 and 3.3 as well as 2.7. Any updates would be much appreciated.

My log is attached:

log-github.txt

from yotta.

thegecko avatar thegecko commented on August 17, 2024

Any idea when this issue started to occur?

Is it something recent?

from yotta.

WillSewell avatar WillSewell commented on August 17, 2024

I'm afraid I don't know. It's my first time using yotta.

from yotta.

nochtli avatar nochtli commented on August 17, 2024

Hi,
The cause of the issue is a call to truncate in semantic_version/base.py. The variable version points to an instance of class yotta.lib.registry_access.RegistryThingVersion which has no truncate method defined:

> /home/build/.local/lib/python3.7/site-packages/semantic_version/base.py(894)match()
-> version = version.truncate('prerelease')
(Pdb) l
889  	        self.build_policy = self.BUILD_STRICT if target.build else build_policy
890  	
891  	    def match(self, version):
892  	        if self.build_policy != self.BUILD_STRICT:
893  	            import pdb; pdb.set_trace()
894  ->	            version = version.truncate('prerelease')
895  	
896  	        if version.prerelease:
897  	            same_patch = self.target.truncate() == version.truncate()
898  	
899  	            if self.prerelease_policy == self.PRERELEASE_SAMEPATCH and not same_patch:
(Pdb) interact
*interactive*
>>> version
[email protected] from the public module registry
>>> type(version)
<class 'yotta.lib.registry_access.RegistryThingVersion'>
>>> 
now exiting InteractiveConsole...
(Pdb) n
AttributeError: 'RegistryThingVersion' object has no attribute 'truncate'

from yotta.

thegecko avatar thegecko commented on August 17, 2024

@psch2 great work, please open a PR and we can check all tests are still good.

from yotta.

lapointexavier avatar lapointexavier commented on August 17, 2024

@thegecko Would it be possible to get a new release to include 047cff2? I am a new user, just installed 0.19.0, and I'm affected by that bug. Thanks!

from yotta.

thegecko avatar thegecko commented on August 17, 2024

I've released a newer version to TestPyPI:

https://test.pypi.org/project/yotta/

Could you try it out and confirm it fixes this issue?

from yotta.

lapointexavier avatar lapointexavier commented on August 17, 2024

@thegecko It did, thanks!

from yotta.

thegecko avatar thegecko commented on August 17, 2024

OK, thanks.

I've released v0.20.0

from yotta.

Related Issues (20)

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.