-2

When I try to prepare my data set then I am getting a error message that group argument must be None for now. Please help me out how to solve it.

I am doing it on jupyter, and thread class has some problems. It showed me this assert group is None:

AssertionError: group argument must be None for now

and DataPreparation.ipynb is another file which has the Prepare class in it.

DataPreparation.Prepare(Xdata,Ydata,XdataT,YdataT)

import threading

class Prepare(threading.Thread):
    def _init_(self, X, Y, XT, YT, accLabel=None):

        threading.Thread._init_(self)
        self.X=X
        self.Y=Y
        self.XT=XT
        self.YT=YT
        self.accLabel= accLabel 

With this code, I am getting this error

AssertionError: group argument must be None for now
  • 1
    Would be helpful if you share the code. Also, I think this post can help you, check it out: https://stackoverflow.com/questions/15349997/assertionerror-when-threading-in-python according to that, you maybe just need to pass parameters using keywords. – Ferd Oct 15 '19 at 03:05
  • @Ferd i added the code to post ..now can you plz help – rajesh jha Oct 15 '19 at 09:08

1 Answers1

0

Try this:

Code

In your 'DataPreparation' file(I used a .py file for this, I'm not familiar with using IPython notebook files as modules):

import threading

class Prepare(threading.Thread):
    def __init__(self, x, y, xt, yt, acclabel=None):
        super().__init__() # Python 3.x

        self.x=x
        self.y=y
        self.xt=xt
        self.yt=yt
        self.acclabel= acclabel

And then, in your work/test .ipynb file:

import DataPreparation 

xdata=1
ydata=2
xdatat=3
ydatat=4

# Use keyword references
DataPreparation.Prepare(x=xdata, y=ydata,
                        xt=xdatat, yt=ydatat)

Result

'Prepare' instance created. enter image description here

I also recomend you to read this post, could be helpful for future interaction with Thread class arguments.

Ferd
  • 1,273
  • 14
  • 16