eshangj/stackoverflow_q_and_a_sample huggingface dataset:
Question: I have been trying to get Tensorflow to recognize my GPU within WSL 2. However, I believe that is largely irrelevant for the problem I am having right now. Whenever I try to run the pyenv command within WSL I get the following error: /mnt/c/Users/USER/.pyenv/pyenv-win/bin/pyenv: 3: cygpath: not found /mnt/c/Users/USER/.pyenv/pyenv-win/bin/pyenv: 3: exec: cmd: not found  Pyenv does work outside of the WSL environment. Here are the details of my environment: pyenv - 3.1.1 WSL Kernel - 5.15.133.1-1 WSL version - 2.0.9.0 Windows 10 Windows Version - 10.0.19045.3693  What can I do to make pyenv work inside WSL?

Answer: It seemed that my WSL environment was referring to the pyenv version installed on windows and not the pyenv version installed within WSL (ubuntu). Installing pyenv in WSL and setting the correct path should help. It can be done like this: curl https://pyenv.run | bash  Then add the next bit of code to your ~/.bashrc and change the {USER} variable to your own username. export PATH="/home/USER/.pyenv/bin:$PATH" eval "$(pyenv init -)" eval "$(pyenv virtualenv-init -)"  For more details on installing pyenv in WSL Ubuntu, see here.  p.s. If you get a 'permission denied' error with cygpath and exec:cmd, see here.
Question: Given a function that accepts "**kwargs", e.g., def f(**kwargs): print(kwargs)  how can I pass a key-value pair if the key contains a dot/period (.)? The straightforward way results in a syntax error: In [46]: f(a.b=1) Cell In[46], line 1 f(a.b=1) ^ SyntaxError: expression cannot contain assignment, perhaps you meant "=="? 

Answer: Python functions only accepts valid python names (letters, underscore, and digits except for the first character), a dot is not allowed. If you want to have a string a.b as parameter, then you must use a dictionary f(**{'a.b': 1}) # {'a.b': 1}  You can combine this with other parameters: f(x=2, **{'a.b': 1}) # {'x': 2, 'a.b': 1}
Question: is that possible to display value of another fields of related field? For example, by default, in Sale Order, the displayed value of partner_id is the value of partner_id.name .. how if I want to display value of partner_id.mobile instead of their default? I've tried explicitly declare "partner_id.{FIELD}" like this one below, but the SO model always detects that those fields are not available in the model : <?xml version="1.0" encoding="utf-8"?> <odoo> <record id="sale_order_form_inherit" model="ir.ui.view"> <field name="name">sale.order.form.inherit</field> <field name="model">sale.order</field> <field name="inherit_id" ref="sale.sale_order_form"/> <field name="arch" type="xml"> <notebook position="inside"> <page string="BSP Prinsipal" name="bsp_prinsipal_page"> <group> <field name="partner_id.cp_logistik"/> <field name="partner_id.cp_finance"/> <field name="partner_id.cp_marketing"/> </group> </page> </notebook> </field> </record> </odoo>  Thanks in advance, by the way!

Answer: You can't use dotted field names in the form view. You can use a related field and remove partner_id from the field name Example:  Inherit sale order model: class SaleOrder(models.Model): _inherit = 'sale.order' cp_logistik = fields.Float(related="partner_id.cp_logistik") cp_finance = fields.Float(related="partner_id.cp_finance") cp_marketing = fields.Float(related="partner_id.cp_marketing")   Use related field names in form view: <record id="sale_order_form_inherit" model="ir.ui.view"> <field name="name">sale.order.form.inherit</field> <field name="model">sale.order</field> <field name="inherit_id" ref="sale.sale_order_form"/> <field name="arch" type="xml"> <notebook position="inside"> <page string="BSP Prinsipal" name="bsp_prinsipal_page"> <group> <field name="cp_logistik"/> <field name="cp_finance"/> <field name="cp_marketing"/> </group> </page> </notebook> </field> </record>    . You may need to modify the field types
Question: After updating to Python 3.12, I get warnings about invalid escape sequence on some triple-quotes comments. Is this a new restriction? I have the habit of documenting code using triple-quoted string, but this has never been a problem prior to Python 3.12. python3 --version Python 3.12.0 $ ./some_script.py /some_script.py:123: SyntaxWarning: invalid escape sequence '\d' """  I tried replacing all lines with \d: 20230808122708.445|INFO|C:\dist\work\trk-fullstack-test\namespaces.py with \\d: 20230808122708.445|INFO|C:\\dist\work\trk-fullstack-test\namespaces.py The warning disappears. Suppressing the warning do not seem to work: import warnings warnings.filterwarnings('ignore', category=SyntaxWarning)  Any pointers on how to do this correctly? I hope I do not have to escape all Windows paths documented in triplequotes in our code.

Answer: Back in Python 3.6, using invalid escape sequences in string literals was deprecated (bpo-27364). Since then, attempting to use an invalid escape sequence has emitted a DeprecationWarning. This can often go unnoticed if you don't run Python with warnings enabled. DeprecationWarnings are silenced by default. Python 3.12 upgraded the DeprecationWarning to a SyntaxWarning. SyntaxWarnings are emitted by the compiler when the code is parsed, not when it's being run, so they cannot be ignored using a runtime warning filter. Unlike DeprecationWarnings, SyntaxWarnings are displayed by default, which is why you're seeing it now. This increase in visibility was intentional. In a future version of Python, using invalid escape sequences in string literals is planned to eventually become a hard SyntaxError. The simplest solution would be to use # comments for comments instead of string literals. Unlike string literals, comments aren't required to follow any special syntax rules. See also the discussion in Python comments: # vs. strings for more on the drawbacks of using string literals as comments. To address this warning in general, you can make the string literal a raw string literal r"...". Raw string literals do not process escape sequences. For example, the string "\n" contains a single newline character, whereas the string r"\n" contains the two characters \ and n.
Question: I am trying to transfer my pandas code into polars but I have a difficulties with duplicating lines (I need it for my pyvista visualizations). In pandas I did the following: df = pd.DataFrame({ "key": [1, 2, 3], "value": [4, 5, 6] }) df["key"] = df["key"].apply(lambda x: 2*[x]) df = df.explode("key", ignore_index=False )  In polars I tried df = pl.DataFrame({ "key": [1, 2, 3], "value": [4, 5, 6] }) df.with_columns( (pl.col("key").map_elements(lambda x: [x]*2)) .explode() )  but it raises:  ShapeError: unable to add a column of length 6 to a DataFrame of height 3  I also tried to avoid map_elements using df.with_columns( (pl.col("key").cast(pl.List(float))*2) .explode() )  but it only raises:  InvalidOperationError: can only do arithmetic operations on Series of the same size; got 3 and 1  Any idea how to do this?

Answer: You can use .repeat_by() and .flatten() df = pl.DataFrame({ "key": [1, 2, 3], "value": [4, 5, 6] }) df.select(pl.all().repeat_by(2).flatten())  shape: (6, 2) ┌─────┬───────┐ │ key ┆ value │ │ --- ┆ --- │ │ i64 ┆ i64 │ ╞═════╪═══════╡ │ 1 ┆ 4 │ │ 1 ┆ 4 │ │ 2 ┆ 5 │ │ 2 ┆ 5 │ │ 3 ┆ 6 │ │ 3 ┆ 6 │ └─────┴───────┘
Question: I'm trying to aggregate some rows in my dataframe with a list[str] column. For each id I need the intersection of all the lists in the group. Not sure if I'm just overthinking it but I can't provide a solution right now. Any help please? df = pl.DataFrame( {"id": [1,1,2,2,3,3], "values": [["A", "B"], ["B", "C"], ["A", "B"], ["B", "C"], ["A", "B"], ["B", "C"]] } )  Expected output shape: (3, 2) ┌─────┬───────────┐ │ idx ┆ values │ │ --- ┆ --- │ │ i64 ┆ list[str] │ ╞═════╪═══════════╡ │ 1 ┆ ["B"] │ │ 2 ┆ ["B"] │ │ 3 ┆ ["B"] │ └─────┴───────────┘  I've tried some stuff without success df.group_by("id").agg( pl.reduce(function=lambda acc, x: acc.list.set_intersection(x), exprs=pl.col("values")) ) # shape: (3, 2) # ┌─────┬──────────────────────────┐ # │ id ┆ values │ # │ --- ┆ --- │ # │ i64 ┆ list[list[str]] │ # ╞═════╪══════════════════════════╡ # │ 1 ┆ [["A", "B"], ["B", "C"]] │ # │ 3 ┆ [["A", "B"], ["B", "C"]] │ # │ 2 ┆ [["A", "B"], ["B", "C"]] │ # └─────┴──────────────────────────┘  Another one df.group_by("id").agg( pl.reduce(function=lambda acc, x: acc.list.set_intersection(x), exprs=pl.col("values").explode()) ) # shape: (3, 2) # ┌─────┬──────────────────────┐ # │ id ┆ values │ # │ --- ┆ --- │ # │ i64 ┆ list[str] │ # ╞═════╪══════════════════════╡ # │ 3 ┆ ["A", "B", "B", "C"] │ # │ 1 ┆ ["A", "B", "B", "C"] │ # │ 2 ┆ ["A", "B", "B", "C"] │ # └─────┴──────────────────────┘ 

Answer: I'm not sure if this is as simple as it may first seem. You could get rid of the lists and use "regular" Polars functionality. One way to check if a value is contained in each row of the id group is to count the number of unique (distinct) row numbers per id, values group. (df.with_columns(group_len = pl.len().over("id")) .with_row_index() .explode("values") .with_columns(n_unique = pl.col.index.n_unique().over("id", "values")) )  shape: (12, 5) ┌────────┬─────┬────────┬───────────┬──────────┐ │ index ┆ id ┆ values ┆ group_len ┆ n_unique │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ u32 ┆ i64 ┆ str ┆ u32 ┆ u32 │ ╞════════╪═════╪════════╪═══════════╪══════════╡ │ 0 ┆ 1 ┆ A ┆ 2 ┆ 1 │ │ 0 ┆ 1 ┆ B ┆ 2 ┆ 2 │ # index = [0, 1] │ 1 ┆ 1 ┆ B ┆ 2 ┆ 2 │ │ 1 ┆ 1 ┆ C ┆ 2 ┆ 1 │ │ 2 ┆ 2 ┆ A ┆ 2 ┆ 1 │ │ 2 ┆ 2 ┆ B ┆ 2 ┆ 2 │ # index = [2, 3] │ 3 ┆ 2 ┆ B ┆ 2 ┆ 2 │ │ 3 ┆ 2 ┆ C ┆ 2 ┆ 1 │ │ 4 ┆ 3 ┆ A ┆ 2 ┆ 1 │ │ 4 ┆ 3 ┆ B ┆ 2 ┆ 2 │ # index = [4, 5] │ 5 ┆ 3 ┆ B ┆ 2 ┆ 2 │ │ 5 ┆ 3 ┆ C ┆ 2 ┆ 1 │ └────────┴─────┴────────┴───────────┴──────────┘  You can filter those, and rebuild the lists with .group_by() (df.with_columns(pl.len().over("id").alias("group_len")) .with_row_index() .explode("values") .filter( pl.col.index.n_unique().over("id", "values") == pl.col.group_len ) .group_by("id", maintain_order=True) .agg(pl.col.values.unique()) )  shape: (3, 2) ┌─────┬───────────┐ │ idx ┆ values │ │ --- ┆ --- │ │ i64 ┆ list[str] │ ╞═════╪═══════════╡ │ 1 ┆ ["B"] │ │ 2 ┆ ["B"] │ │ 3 ┆ ["B"] │ └─────┴───────────┘
Question: I got this error: Traceback (most recent call last): File "C:\ProgramData\anaconda3\Lib\site-packages\notebook\traittypes.py", line 235, in _resolve_classes klass = self._resolve_string(klass) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Cristian Valiante\AppData\Roaming\Python\Python311\site-packages\traitlets\traitlets.py", line 2025, in _resolve_string return import_item(string) ^^^^^^^^^^^^^^^^^^^ File "C:\Users\Cristian Valiante\AppData\Roaming\Python\Python311\site-packages\traitlets\utils\importstring.py", line 31, in import_item module = __import__(package, fromlist=[obj]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ModuleNotFoundError: No module named 'jupyter_server.contents' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\ProgramData\anaconda3\Scripts\jupyter-notebook-script.py", line 10, in sys.exit(main()) ^^^^^^ File "C:\Users\Cristian Valiante\AppData\Roaming\Python\Python311\site-packages\jupyter_core\application.py", line 280, in launch_instance super().launch_instance(argv=argv, **kwargs) File "C:\Users\Cristian Valiante\AppData\Roaming\Python\Python311\site-packages\traitlets\config\application.py", line 1051, in launch_instance app = cls.instance(**kwargs) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Cristian Valiante\AppData\Roaming\Python\Python311\site-packages\traitlets\config\configurable.py", line 575, in instance inst = cls(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Cristian Valiante\AppData\Roaming\Python\Python311\site-packages\traitlets\traitlets.py", line 1311, in __new__ inst.setup_instance(*args, **kwargs) File "C:\Users\Cristian Valiante\AppData\Roaming\Python\Python311\site-packages\traitlets\traitlets.py", line 1354, in setup_instance super(HasTraits, self).setup_instance(*args, **kwargs) File "C:\Users\Cristian Valiante\AppData\Roaming\Python\Python311\site-packages\traitlets\traitlets.py", line 1330, in setup_instance init(self) File "C:\ProgramData\anaconda3\Lib\site-packages\notebook\traittypes.py", line 226, in instance_init self._resolve_classes() File "C:\ProgramData\anaconda3\Lib\site-packages\notebook\traittypes.py", line 238, in _resolve_classes warn(f"{klass} is not importable. Is it installed?", ImportWarning) TypeError: warn() missing 1 required keyword-only argument: 'stacklevel'  Thank you for help ! :) I have tried installing and uninstalling and it didnt work.

Answer: Edit: https://github.com/jupyter/notebook/issues/7048#issuecomment-1724637960 https://github.com/jupyter/notebook/issues/7048#issuecomment-1720815902 pip install notebook==6.5.6  Or as @West commented, use: pip install --upgrade --no-cache-dir notebook==6.*   Old Answer : The Workaround: Uninstall the Recent Problematic Release (v5.10.0) and Install the Prior Version (v5.9.0). Command Line: pip uninstall traitlets pip install traitlets==5.9.0  Git links: https://github.com/microsoft/azuredatastudio/issues/24436#issuecomment-1723328100 https://github.com/jupyter/notebook/issues/7048
Question: # env_vars.sh on rank 0 machine #!/bin/bash export MASTER_PORT=23456 export MASTER_ADDR=... # same as below, private ip of machine 0 export WORLD_SIZE=2 export GLOO_SOCKET_IFNAME=enX0 export RANK=0 # env_vars.sh on rank 1 machine #!/bin/bash export MASTER_PORT=23456 export MASTER_ADDR=... # same as above export WORLD_SIZE=2 export GLOO_SOCKET_IFNAME=enX0 export RANK=1 # on rank 0 machine $ ifconfig enX0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9001 inet ... netmask 255.255.240.0 broadcast ... inet6 ... prefixlen 64 scopeid 0x20<link> ether ... txqueuelen 1000 (Ethernet) RX packets 543929 bytes 577263126 (550.5 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 203942 bytes 21681067 (20.6 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 12 bytes 1020 (1020.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 12 bytes 1020 (1020.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 $ conda activate pytorch_env $ . env_vars.sh $ python >>> import torch.distributed >>> torch.distributed.init_process_group('gloo') # Do the same on rank 0 machine  After 30 seconds or so, machine 0 outputs the following, and machine 1 just continues to hang. [E ProcessGroupGloo.cpp:138] Gloo connectFullMesh failed with [/opt/conda/conda-bld/pytorch_1699449045860/work/third_party/gloo/gloo/transport/tcp/pair.cc:144] no error Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/ec2-user/miniconda3/envs/pytorch_env/lib/python3.9/site-packages/torch/distributed/c10d_logger.py", line 74, in wrapper func_return = func(*args, **kwargs) File "/home/ec2-user/miniconda3/envs/pytorch_env/lib/python3.9/site-packages/torch/distributed/distributed_c10d.py", line 1155, in init_process_group default_pg, _ = _new_process_group_helper( File "/home/ec2-user/miniconda3/envs/pytorch_env/lib/python3.9/site-packages/torch/distributed/distributed_c10d.py", line 1293, in _new_process_group_helper backend_class = ProcessGroupGloo(backend_prefix_store, group_rank, group_size, timeout=timeout) RuntimeError: Gloo connectFullMesh failed with [/opt/conda/conda-bld/pytorch_1699449045860/work/third_party/gloo/gloo/transport/tcp/pair.cc:144] no error  I can connect to the rank 0 machine from the rank 1 machine: # rank 0 machine nc -lk 23456 # rank 1 machine telnet … 23456 # use private ip address of rank 0 machine Trying ... Connected to … Escape character is '^]'. ping # rank 0 machine ping  If I run all the same commands from two shells of the rank 0 machine (modifying one of them with export RANK=1), init_process_group completes execution as expected. A user posted here about the same error, which they said they solved by resetting GLOO_SOCKET_IFNAME and TP_SOCKET_IFNAME. Trying to do a similar thing on my machine didn't succeed.

Answer: I solved this problem by enabling All Traffic between my nodes. Initially, I was just allowing the MASTER_PORT and that was not enough.
Question: import os from langchain.llms import OpenAI import bs4 import langchain from langchain import hub from langchain.document_loaders import UnstructuredFileLoader from langchain.embeddings import OpenAIEmbeddings from langchain.text_splitter import RecursiveCharacterTextSplitter from langchain.vectorstores import Chroma os.environ["OPENAI_API_KEY"] = "KEY" loader = UnstructuredFileLoader( 'path_to_file' ) docs = loader.load() text_splitter = RecursiveCharacterTextSplitter( chunk_size=1000, chunk_overlap=200, add_start_index=True ) all_splits = text_splitter.split_documents(docs) vectorstore = Chroma.from_documents(documents=all_splits, embedding=OpenAIEmbeddings()) retriever = vectorstore.as_retriever(search_type="similarity", search_kwargs={"k": 6}) retrieved_docs = retriever.get_relevant_documents( "What is X?" )  This returns: [Document(page_content="...", metadata={'source': 'path_to_text', 'start_index': 16932}), Document(page_content="...", metadata={'source': 'path_to_text', 'start_index': 16932}), Document(page_content="...", metadata={'source': 'path_to_text', 'start_index': 16932}), Document(page_content="...", metadata={'source': 'path_to_text', 'start_index': 16932}), Document(page_content="...", metadata={'source': 'path_to_text', 'start_index': 16932}), Document(page_content="...", metadata={'source': 'path_to_text', 'start_index': 16932})]  Which is all seemingly the same document. When I first ran this code in Google Colab/Jupyter Notebook, it returned different documents...as I ran it more, it started returning the same documents. Makes me feel like this is a database issue, where the same entry is being inserted into the database with each run. How do I return 6 different unique documents?

Answer: the issue is here: Chroma.from_documents(documents=all_splits, embedding=OpenAIEmbeddings())  everytime you execute the file, you are inserting the same documents into the database. you could comment out that part of code if you are inserting from same file. or you could detect the similar vectors using EmbeddingsRedundantFilter  Filter that drops redundant documents by comparing their embeddings.
Question: Problem I use connextion with Flask. Today I upgraded connexion from 2.14.2 to 3.0.2 and see ModuleNotFoundError: Please install connexion using the 'flask' extra. https://connexion.readthedocs.io/en/latest/quickstart.html I checked the official documentation, which says "To leverage the FlaskApp, make sure you install connexion using the flask extra." Question How can I install connexion using the flask extra? The documentation says the command is pip install connexion[<extra>], but I see an error message "no matches found: connexion[flask]". % pip install connexion[flask] zsh: no matches found: connexion[flask]  Environment  Python 3.12.0 Flask 3.0.0 Connexion 3.0.2 

Answer: https://github.com/spec-first/connexion/issues/779#issuecomment-441081238 I find this error was caused by zsh. pip install "connexion[flask]" worked. (Double quotations are needed.)
Question: I want to use python to compared two images to check whether they are the same or not, I want to use this for fingerprint functionality in django app to validate whether the provided fingerprint is matches the one stored in the database. I have decided to use OpenCV for this purpose, utilizing ORB_create with detectAndCompute and providing the provided fingerprint to the BFMatcher. However, with the code below, when attempting to match the images, it consistently return True, while the provided images are not the same, along with the print statment "Images are the same". def compared_fingerprint(image1, image2): finger1 = cv2.imread(image1, cv2.IMREAD_GRAYSCALE) finger2 = cv2.imread(image2, cv2.IMREAD_GRAYSCALE) orb = cv2.ORB_create() keypoints1, descriptors1 = orb.detectAndCompute(finger1, None) keypoints2, descriptors2 = orb.detectAndCompute(finger2, None) bf = cv2.BFMatcher() matches = bf.match(descriptors1, descriptors2) threshold = 0.7 similar = len(matches) > threshold * len(keypoints1) if similar: print('Images are the same') return similar else: print('Images are not the same') return similar result = compared_fingerprint('c.jpg', 'a.jpg') print(result)  With the provided images, the function supposed to return the second statement, since, they are not the same, I thought, it was the threshold assign to 0.7, and when I increase the threshold to 1.7, it return the second statement saying: "Images are not the same" False, but when I try to make the images to be the same, I mean: result = compared_fingerprint('a.jpg', 'a.jpg'), it's still return "Images are not the same" False. a.jpg  c.jpg 

Answer: Fingerprints are matched using features specific to fingerprints. Fingerprints are mostly just ridges running in parallel, so that's boring. The interesting and identifying features are swirls (ridges curve around), ridge ends, short "island" segments (and their lengths), forks, ... https://en.wikipedia.org/wiki/Fingerprint#Fingerprint_verification Generic local feature descriptors may work but are not specific to fingerprints. You'll need to do the literature research to learn what feature descriptors have performed well on fingerprints. Features then need to match in a spatially consistent manner. Rotation and translation don't matter. Some stretching and even less shearing are tolerable. Perspective components are extrmely unlikely. If you estimate a transform, you'll need to assess how much it contorts.
Question: I'm working through the book Python Crash Course 2nd Edition, and I did what they outlined, but they did something that runs a warning in VS code (Useless parent or super() delegation in method '__init__'). They don't go over how to fix it, and I don't think it does anything (please tell me whether it does or not), but I'd like to not have the message, and I don't want to have the same thing happen in the future. Here is the code for the child class: class ElectricCar(Car): """A child class of the parent Car, specific to electric cars.""" def __init__(self, make, model, year): """Initialize attributes of the parent class.""" super().__init__(make, model, year)  Here is the code for the parent class, if it's needed: class Car: """A class to represent a car.""" def __init__(self, make, model, year): """Initialize attributes to describe a car.""" self.make = make self.model = model self.year = year self.odometer_reading = 0 def get_descriptive_name(self): """Return a neatly formatted descriptive name.""" long_name = f"{self.year} {self.make} {self.model}" return long_name.title() def read_odometer(self): """Print a statement showing the car's mileage.""" print(f"This car has {self.odometer_reading} miles on it.")  Thanks for any and all help. P.S. I apologise if the code blocks don't look like code. I clicked on the 'Code block' button when the code was selected, but while viewing, it didn't have syntax highlighting (please tell me whether I did it correctly or not, and if not, how to do it next time).

Answer: Let's say that you didn't add __init__ to your subclass at all. The parent __init__ has not been overridden and will be called when ElectricCar(...) is instantiated. Your ElectricCar.__init__ doesn't do anything that python wouldn't do anyway. You only need your own __init__ if you plan to do something different that the parent class. Just delete your __init__ method to make the warning go away.