#๐ im not getting output printed in the command prompt although being my code is 100% correct
46 messages ยท Page 1 of 1 (latest)
@thorny mountain
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
how do i send the code
let me send paste bin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
whats wrong in my code
this is the output i get
There's nothing in the code that's calling it to start
I assume its the start_connection()?
yeah
OK what do you put in for the parameters?
host and port?
Oh I don't think that's right. It looks like its supposed to be part of the LocalNetworkHandler class
So its not indented in correctly
Did you copy and paste this code @thorny mountain ? It seems poorly made
yeah im reffering to a github repo
Can you share the repo link?
yep
You didn't copy the last 2 lines
But I doubt even then this script won't work on its own
let me to a quick run
Its just a class and just needs to be imported into another
Why do you need this bit of code?
i want to decode raw data with base64 and parse with protos
the IncomingData.py serves the purpose
rest all is not needed
so that code is perfect not able to run
Because none of it is being called
This is how its being called https://github.com/Advaith2468/RAB/blob/021cb1e562cd86afd07f57d692ed6da7068ccdcd/rab/rab.py#L4011-L4013
rab/rab.py lines 4011 to 4013
localnetwork = LocalNetworkHandler(self.config['network'].get(
'host', '0.0.0.0'), self.config['network'].get('port', 5120))
localnetwork.config = self.config```
and that is if you understand how self. works
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
logger = logging.getLogger('rab')
its aready imported right
have the rab.py file too
This code only enables logging. Just to help log the application. So no. The class LocalNetworkHandler is not imported or being called
how do i make this run now ๐ ๐
That's part of the basics of Python. If you don't understand how "imports" work or how a function or a class is called, then you better study up instead of blindly copying and pasting random code and hope that it works
!resources have lots of good courses and tutorials
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.