flower icon indicating copy to clipboard operation
flower copied to clipboard

TypeError: Can't instantiate abstract class CifarClient with abstract methods get_properties

Open phleungae opened this issue 4 years ago • 4 comments

I just did a clean installation using Anaconda3, running on Windows 10 64Bit. I assume that for my first trial, I do not need to modify the code and therefore I followed the installation instruction and quickly tried on "quickstart_tensorflow", "quicksart_Pytorch" and "advanced_tensorflow". But when I run "python client.py", all 3 examples shows the same error message as shown below.

error

I am quite new to programming and have never faced problem with abstract class and method. May I know what is happening here ? Thank you very much !

phleungae avatar Dec 02 '21 08:12 phleungae

I encountered the same problem as you and found the reasons are as follows:

  1. The version of flwr installed through pip is 0.17.0(0.18.0 has not been released), there is no abstract methods get_properties for abstract class Client or NumPyClient;
  2. The code I debugged is 0.18.0, and examples in src/py/flwr_example are not updated I guess.

So, you can fall back to the version corresponding to the installed version to debug.

dulicui avatar Dec 07 '21 08:12 dulicui

Can anyone have a solution for this problem? It's been 2 months since the issue was created.

makhanov-nu avatar Feb 09 '22 08:02 makhanov-nu

I am encountering the same problem. @phleungae @makhanov-nu Have you found any solution?

aayush9753 avatar Apr 20 '22 11:04 aayush9753

@aayush9753 @makhanov-nu @dulicui @phleungae sorry for the issue you were experiencing, there was a transition period where the code examples did not fully match the version released at the time.

Could you try again? With Flower 0.18 released everything should work as expected.

danieljanes avatar Apr 24 '22 20:04 danieljanes