Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

dash-generate-components creates __init__.py in wrong directory

Open
#111 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
tooling

Research direction

Start by reproducing the reported dash-generate-components command against a fresh dash-component-boilerplate and inspect the generator entry point it invokes. Verify where init.py is written and compare that with the xxx_frontend package layout; done means the generated file is placed inside the package and usage.py no longer raises the reported AttributeError.

Written by the indexing model from the issue text.

Description

Hi,

I've created a new dash-component-boilerplate no changes made.

When calling dash-generate-components as below the __init__.py is created in the toplevel directory.

dash-generate-components ./src/lib/components xxx_frontend -p package-info.json

Thus running python usage.py results in

AttributeError: module 'xxx_frontend' has no attribute 'XxxFrontend'

When I mannually move the __init__.py to the xxx_frontend folder it works.

Downloaded the latest dash-component-boilerplate version as of today.

Thanks a lot for any help.

For completeness here is the content of the toplevel directory:

-rwxrwxrwx 1 user user    445 Nov 12 07:53 .babelrc
-rwxrwxrwx 1 user user     31 Nov 12 07:53 .eslintignore
-rwxrwxrwx 1 user user   3545 Nov 12 07:53 .eslintrc
-rwxrwxrwx 1 user user   4890 Nov 12 07:53 .gitignore
drwxrwxrwx 1 user user   4096 Nov 12 10:45 .idea
-rwxrwxrwx 1 user user    307 Nov 12 07:53 .npmignore
-rwxrwxrwx 1 user user    110 Nov 12 07:53 .prettierrc
-rwxrwxrwx 1 user user  17355 Nov 12 07:53 .pylintrc
-rwxrwxrwx 1 user user    225 Nov 12 07:53 CONTRIBUTING.md
-rwxrwxrwx 1 user user      0 Nov 12 07:53 LICENSE
-rwxrwxrwx 1 user user    228 Nov 12 07:53 MANIFEST.in
-rwxrwxrwx 1 user user   3572 Nov 12 07:53 README.md
-rwxrwxrwx 1 user user   1273 Nov 12 07:53 __init__.py
-rwxrwxrwx 1 user user     78 Nov 12 07:53 _imports_.py
-rwxrwxrwx 1 user user   1722 Nov 12 07:53 _validate_init.py
drwxrwxrwx 1 user user   4096 Nov 12 10:28 xxx_frontend
drwxrwxrwx 1 user user   4096 Nov 12 08:30 xxx_frontend.egg-info
-rwxrwxrwx 1 user user    210 Nov 12 07:53 index.html
drwxrwxrwx 1 user user   4096 Nov 12 08:40 node_modules
-rwxrwxrwx 1 user user 436598 Nov 12 08:06 package-lock.json
-rwxrwxrwx 1 user user   1656 Nov 12 08:26 package.json
-rwxrwxrwx 1 user user    152 Nov 12 07:53 pytest.ini
-rwxrwxrwx 1 user user     58 Nov 12 07:53 requirements.txt
-rwxrwxrwx 1 user user   3343 Nov 12 07:53 review_checklist.md
-rwxrwxrwx 1 user user    533 Nov 12 07:53 setup.py
drwxrwxrwx 1 user user   4096 Nov 12 09:26 src
drwxrwxrwx 1 user user   4096 Nov 12 07:53 tests
-rwxrwxrwx 1 user user    535 Nov 12 07:53 usage.py
-rwxrwxrwx 1 user user   2215 Nov 12 07:53 webpack.config.js
-rwxrwxrwx 1 user user    366 Nov 12 07:53 webpack.serve.config.js

Note: even this is a unix listing I am running the software in Windows 10.

Dominant language
Python
Stars
294
Forks
196
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from plotly/dash-component-boilerplate

All issues in plotly/dash-component-boilerplate

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.