Giter Site home page Giter Site logo

Unable to launch about discord-web-panel HOT 9 CLOSED

daste745 avatar daste745 commented on August 15, 2024
Unable to launch

from discord-web-panel.

Comments (9)

Daste745 avatar Daste745 commented on August 15, 2024

I forgot to add the module to the PYTHONPATH environmental variable, because PyCharm set that up for me automatically. Run this command and it should work now:
export PYTHONPATH="$PYTHONPATH:$HOME/path/to/discord-web-panel"
I will include this step in README.

I believe, that all the imports are fine, it was only a matter of me not trying to run the app outside of PyCharm. Let me know if that solves your problem. Thanks for pointing this issue out!

image

from discord-web-panel.

skylarr1227 avatar skylarr1227 commented on August 15, 2024

Trying it now, sorry I'm strictly mobile these days so troubleshooting like this can be a real pain. I'll let u know if it worked tho I appreciate it greatly!!

from discord-web-panel.

skylarr1227 avatar skylarr1227 commented on August 15, 2024

It still is the same error

ModuleNotFoundError: No module named 'discord_web_panel' root@skybot:~/a/discord-web-panel/discord_web_panel# python3.6 app.py Traceback (most recent call last): File "app.py", line 12, in <module> from discord_web_panel.discord_entites import User, Guild, get_user, get_guilds ModuleNotFoundError: No module named 'discord_web_panel' root@skybot:~/a/discord-web-panel/discord_web_panel# python3.7 app.py Traceback (most recent call last): File "app.py", line 12, in <module> from discord_web_panel.discord_entites import User, Guild, get_user, get_guilds ModuleNotFoundError: No module named 'discord_web_panel' root@skybot:~/a/discord-web-panel/discord_web_panel#

from discord-web-panel.

Daste745 avatar Daste745 commented on August 15, 2024

Seems like you haven't configured PYTHONPATH correctly. Can you please show the output of echo $PYTHONPATH? Keep in mind that environmental variables only persist as long as you keep your shell running, so you need to execute the export in every new session.

I've updated the README to include instructions on adding this app to your PYTHONPATH.

from discord-web-panel.

skylarr1227 avatar skylarr1227 commented on August 15, 2024

Yes, I have

root@skybot:~/a/discord-web-panel/discord_web_panel# echo $PYTHONPATH :/a/discord-web-panel/discord_web_panel/

This is what I typed
export PYTHONPATH="$PYTHONPATH:$ROOT/a/discord-web-panel/discord_web_panel/"

from discord-web-panel.

skylarr1227 avatar skylarr1227 commented on August 15, 2024

I think I fixed that by changing it to $HOME/ instead of $ROOT.... But the import is still not working the same as before....

from discord-web-panel.

Daste745 avatar Daste745 commented on August 15, 2024

I haven't pointed that out, but you are going one directory too deep. Try doing this:
export PYTHONPATH="$PYTHONPATH:$HOME/a/discord-web-panel

This tells python to look for the module discord_web_panel in the directory discord-web-panel. I know that it can be a bit confusing and sorry for that.

from discord-web-panel.

skylarr1227 avatar skylarr1227 commented on August 15, 2024

Ok so it works now perfect. Only one more question and I'll leave you be, can the port be changed from 5000?

from discord-web-panel.

Daste745 avatar Daste745 commented on August 15, 2024

Yeah, it can. See line 44 in app.py.

I'm closing the issue, I will take more precautions on writing instructions in the future. Thanks!

from discord-web-panel.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.