-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: partially initialized module 'dash_html_components' has no attribute 'Div' (most likely due to a circular import) #1502
Comments
This sounds similar to #1143 (which has been fixed in the dev branch but not yet released). What is the name of this file? |
dash.py
…On Wed, 16 Dec 2020, 19:28 Alex Johnson, ***@***.***> wrote:
This sounds similar to #1143 <#1143>
(which has been fixed in the dev branch but not yet released). What is the
name of this file?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1502 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMGI5NYNHQAY23POQKQPEMTSVC4ILANCNFSM4U54BDAA>
.
|
yep, that would be it - you can't give your own script a name that matches any of the packages in your system, or when someone else (in this case |
Ok I will look into it.Thanks for the prompt reply.
…On Wed, 16 Dec 2020, 19:39 Alex Johnson, ***@***.***> wrote:
yep, that would be it - you can't give your own script a name that matches
any of the packages in your system, or when someone else (in this case
dash_html_components) tries to do import dash they'll get your file
rather than the installed package. Just change the name to something unique.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1502 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMGI5NZ6VANWCIS64WXHQGDSVC5RJANCNFSM4U54BDAA>
.
|
After changing dash to dashed the errors have reduced.but the error I m
getting is class Dash(object) which we defined when I wrote app = Dash() it
says Dash is not defined.
On Wed, 16 Dec 2020, 19:41 pantina chandrashekhar, <
[email protected]> wrote:
… Ok I will look into it.Thanks for the prompt reply.
On Wed, 16 Dec 2020, 19:39 Alex Johnson, ***@***.***> wrote:
> yep, that would be it - you can't give your own script a name that
> matches any of the packages in your system, or when someone else (in this
> case dash_html_components) tries to do import dash they'll get your file
> rather than the installed package. Just change the name to something unique.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#1502 (comment)>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AMGI5NZ6VANWCIS64WXHQGDSVC5RJANCNFSM4U54BDAA>
> .
>
|
haha I wondered about that - you need |
(base) C:\Users\panti\Downloads\dash-dev\dash-dev\dash>python dashed.py
File "dashed.py", line 1761
if __name__ == '__main__' :
^
SyntaxError: invalid syntax
…On Wed, Dec 16, 2020 at 8:08 PM Alex Johnson ***@***.***> wrote:
haha I wondered about that - you need from dash import Dash
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1502 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMGI5N2RQTXK5E2GHTQ26KDSVDA6NANCNFSM4U54BDAA>
.
|
if __name__ == '__main__':
app.run_server(host='127.0.0.1',port='8050',debug=True)
the above is my code and the error is:-
File "dashed.py", line 1760
if __name__ == '__main__':
^
SyntaxError: invalid syntax
On Wed, Dec 16, 2020 at 8:45 PM pantina chandrashekhar <
[email protected]> wrote:
… (base) C:\Users\panti\Downloads\dash-dev\dash-dev\dash>python dashed.py
File "dashed.py", line 1761
if __name__ == '__main__' :
^
SyntaxError: invalid syntax
On Wed, Dec 16, 2020 at 8:08 PM Alex Johnson ***@***.***>
wrote:
> haha I wondered about that - you need from dash import Dash
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#1502 (comment)>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AMGI5N2RQTXK5E2GHTQ26KDSVDA6NANCNFSM4U54BDAA>
> .
>
|
Wow, line 1760... you have a lot of code in this file. I'd guess unmatched parentheses or something like that somewhere above this line, but I'd recommend getting an IDE with Python syntax checking, that should help you find the problem. The short code you posted first works fine for me once I add the two additional import statements ( |
Ok thanks I will look into it.
…On Wed, 16 Dec 2020, 21:05 Alex Johnson, ***@***.***> wrote:
Wow, line 1760... you have a lot of code in this file. I'd guess unmatched
parentheses or something like that somewhere above this line, but I'd
recommend getting an IDE with Python syntax checking, that should help you
find the problem. The short code you posted first works fine for me once I
add the two additional import statements (dash and dcc)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1502 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMGI5N47IO3PAJYODKK2EQTSVDHTDANCNFSM4U54BDAA>
.
|
Closing, as this issue won't lead to code changes in this repo. For further usage questions, a better forum may be https://community.plotly.com/c/dash/16 Thanks! |
Dash app is not working because of layout not being there but when I included then the error as shown in title comes.Please request you to help me at the earliest.
Regards
Chandrashekhar
The text was updated successfully, but these errors were encountered: