Git Product home page Git Product logo

Comments (17)

DavideDC9 avatar DavideDC9 commented on August 17, 2024 1

image

from ghedt.

j-c-cook avatar j-c-cook commented on August 17, 2024

Can you type pip list and let me know which version of pygfunction you are running? We introduced segment_ratios in version 2.1 (https://github.com/MassimoCimmino/pygfunction/blob/master/CHANGELOG.md#version-210-2021-11-12).

You can run pip install -r requirements.txt to install all the required modules. It should update your pygfunction installation if you are running older than 2.1.

from ghedt.

j-c-cook avatar j-c-cook commented on August 17, 2024

What IDE are you using? Is it accessing the same environment that you list there?

from ghedt.

DavideDC9 avatar DavideDC9 commented on August 17, 2024

I m using pycharm, and yes I have double checked, all the packages and correct versions are installed

from ghedt.

j-c-cook avatar j-c-cook commented on August 17, 2024

Could you go to Settings -> Project: ghedt -> Python Interpretor and share a screen shot of your interpreter where I can see that its pygfunction 2.1.0.

image

from ghedt.

j-c-cook avatar j-c-cook commented on August 17, 2024

That is strange. If you tag @MassimoCimmino's version 2.1.0 release, you can see that a pygfunction.utilities.segment_ratios() function does exist.
image

Have you looked at the pygfunction utilitites.py file in your environment to see if it has the segment_ratios() function. Perhaps try

pip uninstall pygfunction
pip install pygfunction==2.1.0

@mitchute have you ran into this issue?

from ghedt.

DavideDC9 avatar DavideDC9 commented on August 17, 2024

image

from ghedt.

DavideDC9 avatar DavideDC9 commented on August 17, 2024

Yes, I even tried to define it on the example itself

from ghedt.

j-c-cook avatar j-c-cook commented on August 17, 2024

If you look in C:\Users\davide\PychardProjects\pygfunction\G\venv_2 and find the pygfunction package, is the segment_ratios function inside of utilitites.py?

from ghedt.

j-c-cook avatar j-c-cook commented on August 17, 2024

On my system pygfunction is located in lib/python3.7/site-packages/pygfunction.
image

From there, when I open up utilities.py I can see that the segment_ratios function is defined. Is it in yours?
image

from ghedt.

DavideDC9 avatar DavideDC9 commented on August 17, 2024

No, it was not. I ve updated now, thanks.

from ghedt.

j-c-cook avatar j-c-cook commented on August 17, 2024

That is bizarre. Is the example file in ghedt running now?

from ghedt.

DavideDC9 avatar DavideDC9 commented on August 17, 2024

It has changed. I get this error message:
AssertionError: Method 'MIFT' is not an acceptable method.
Please provide one of the following inputs : ['detailed', 'similarities']

from ghedt.

j-c-cook avatar j-c-cook commented on August 17, 2024

Is that a ghedt or pygfunction issue?

from ghedt.

j-c-cook avatar j-c-cook commented on August 17, 2024

I think you need to replace all of the pygfunction files in that directory with version 2.1 files.

from ghedt.

MassimoCimmino avatar MassimoCimmino commented on August 17, 2024

It has changed. I get this error message: AssertionError: Method 'MIFT' is not an acceptable method. Please provide one of the following inputs : ['detailed', 'similarities']

This is a pygfunction v2.0 error. There was a mistake in the reporting which got fixed in v2.1 (and 'equivalent' was also introduced). My guess is ghedt is trying to use the missing 'equivalent' solver.

from ghedt.

j-c-cook avatar j-c-cook commented on August 17, 2024

Yes, the example he is running is trying to use the default g-function calculation (equivalent with unequal segment lengths). Both introduced in pygfunction version 2.1.

@DavideDC9 The issue appears to be that your package manager is reporting that you have pygfunction==2.1 installed when the code contained in the package is actually pygfunction==2.0.

I'm going to close this issue because we have resolved what the original error was, and have found that the solution (for now) is for @DavideDC9 to replace his pygfunction installation with files from the v2.1.0 release. The heart of the issue is located outside of ghedt, perhaps in venv.

from ghedt.

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.