Comments (9)
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!
from discord-web-panel.
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.
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.
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.
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.
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.
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.
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from discord-web-panel.