karlicoss / HPI

Human Programming Interface 🧑👽🤖

Home Page:https://beepb00p.xyz/hpi.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError when importing my.coding.github

hbalp opened this issue · comments

commented

When executing the short short demo retrieving some github_data, I get
the following TypeError: init() missing 1 required positional argument: 'gdpr_dir'
occuring during
import my.coding.github as github_data

Here are the log traces:

In [7]: from orger import Mirror

In [8]: from orger.inorganic import node, link

In [9]: from orger.common import dt_heading

In [10]: import my.coding.github as gd
/usr/local/lib/python3.9/site-packages/HPI-0.2.20201004.dev40-py3.9.egg/my/coding/github.py:3: UserWarning: my.coding.github is deprecated! Please use my.github.all instead!
warnings.warn('my.coding.github is deprecated! Please use my.github.all instead!')

TypeError Traceback (most recent call last)
in
----> 1 import my.coding.github as gd

/usr/local/lib/python3.9/site-packages/HPI-0.2.20201004.dev40-py3.9.egg/my/coding/github.py in
4 # todo why aren't DeprecationWarning shown by default??
5
----> 6 from ..github.all import events, get_events
7
8 # todo deprecate properly

/usr/local/lib/python3.9/site-packages/HPI-0.2.20201004.dev40-py3.9.egg/my/github/all.py in
3 """
4
----> 5 from . import gdpr, ghexport
6
7 from .common import merge_events, Results

/usr/local/lib/python3.9/site-packages/HPI-0.2.20201004.dev40-py3.9.egg/my/github/gdpr.py in
26
27 from ..core.cfg import make_config
---> 28 config = make_config(github)
29
30

/usr/local/lib/python3.9/site-packages/HPI-0.2.20201004.dev40-py3.9.egg/my/core/cfg.py in make_config(cls, migration)
17 if k in {f.name for f in fields(cls)}
18 }
---> 19 return cls(**params) # type: ignore[call-arg]
20
21

TypeError: init() missing 1 required positional argument: 'gdpr_dir'

In [11]:

commented

I get the same error when trying "import my.github.all as gd"

In [14]: import my.github.all as gd

TypeError Traceback (most recent call last)
in
----> 1 import my.github.all as gd

/usr/local/lib/python3.9/site-packages/HPI-0.2.20201004.dev40-py3.9.egg/my/github/all.py in
3 """
4
----> 5 from . import gdpr, ghexport
6
7 from .common import merge_events, Results

/usr/local/lib/python3.9/site-packages/HPI-0.2.20201004.dev40-py3.9.egg/my/github/gdpr.py in
26
27 from ..core.cfg import make_config
---> 28 config = make_config(github)
29
30

/usr/local/lib/python3.9/site-packages/HPI-0.2.20201004.dev40-py3.9.egg/my/core/cfg.py in make_config(cls, migration)
17 if k in {f.name for f in fields(cls)}
18 }
---> 19 return cls(**params) # type: ignore[call-arg]
20
21

TypeError: init() missing 1 required positional argument: 'gdpr_dir'

I dont think this has to do with the recent migration/get_config changes, do you have a config file setup?

You should have one at ~/.config/my/my/config/__init__.py, can run hpi config create to create one.

For an example, see the github block in my config file

The github.gdpr module requires you to point it at the data on your system, (some modules require you to, some dont) for GDPR data you have to export it from here, see example config block here

feel free to reopen if you're still struggling with the config -- hopefully there's been much more docs & aid from CLI since