Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

TypeError when importing my.coding.github #109

Closed
hbalp opened this issue Nov 7, 2020 · 3 comments
Closed

TypeError when importing my.coding.github #109

hbalp opened this issue Nov 7, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@hbalp
Copy link

hbalp commented Nov 7, 2020

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]:

@hbalp
Copy link
Author

hbalp commented Nov 7, 2020

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'

@purarue
Copy link
Contributor

purarue commented Nov 8, 2020

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

@karlicoss karlicoss added the bug Something isn't working label Feb 18, 2021
karlicoss added a commit that referenced this issue Feb 2, 2022
doesn't help in all cases but perhaps helpful anyway

relevant: #109
karlicoss added a commit that referenced this issue Feb 2, 2022
doesn't help in all cases but perhaps helpful anyway

relevant: #109
@karlicoss
Copy link
Owner

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants