Python-Fuzzylogic / fuzzylogic

Fuzzy Logic and Fuzzy Inference for Python 3
MIT License
123 stars 26 forks source link

Cannot import name 'load' from 'stay' #3

Closed stefankaters closed 3 years ago

stefankaters commented 3 years ago

Hi there!

Thanks for creating this wonderful repository in advance. My teacher is referring to your repository as tool for learning and creating Fuzzy Logic. I would like to get started with Fuzzy Logic but I am unable to install your package due to errors.

What I have done beforehand is the following:

But when I try this:

this error pops up:

ImportError: cannot import name 'load' from 'stay'
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

I have also tried the following as describe in Issue 2: pip3 install git+https://github.com/amogorkon/fuzzylogic but with no success.

Is there something I can do to fix this problem? Is there something wrong with your Stay package? When I look for the load() function in your Stay package I am unable to find it.

amogorkon commented 3 years ago

Hey! I'm very surprised and happy to hear that my tinkering even ended up as a study recommendation, that's unexpected!

About your problem. I changed a few things in stay, yes. Try

from stay import Decoder load = Decoder()

that should fix things.

I'll fix it in fuzzylogic code, then you should be able to install it properly.. might take a bit though

amogorkon commented 3 years ago

Btw, please do feel free to report more problems or ideas if you come across anything. For my personal stuff, I usually recycle the "functions" module from the fuzzylogic lib, not the whole package, so I kind of lost track of possible improvements.

stefankaters commented 3 years ago

Your solution worked for me! Thanks a lot.

stefankaters commented 3 years ago

Btw, please do feel free to report more problems or ideas if you come across anything. For my personal stuff, I usually recycle the "functions" module from the fuzzylogic lib, not the whole package, so I kind of lost track of possible improvements.

I will!