PortScanner
PortScanner copied to clipboard
[BUG] .pyc files needs to be deleted before running this project.
An issue occurs when you first try to run the CLI through Python2. This results in creation of Python2 *.pyc
files on the local machine. After this if the those files are not deleted and on running Flask UI through Python3 (which uses old Python2 *.pyc file), we get the above error.
*.pyc
files interfere with normal working of the project.
This issue can be solved by deleting the *.pyc
files from the repository folder from the local machine.
Refer to this issue thread for details.
Expected behavior - Delete all the *.pyc
files automatically before running the project.
@Kashish121 Currently on working on that too.
@palrohitg assigning it to you. Submit the corresponding PR by tomorrow EOD.
@Kashish121 I generated the PR #148 and their is no issue while running the flask server for branch features/python3.8 I am using the python3.8 to run the server. For this issue I need to do checkout what the issue is actually while using python2 and then discussion on further. But I think this is not the potential bug for branch features/python3.8 because it clearly mention this branch is for developer who is working with python3. Need to know what do u think?
@Kashish121 I checkout in my local environment once you had python virutalenv activated then there is no issue. It pretty sure, if you are working with python3 env but trying to run the server will be some package which is deprected by python2
So, this happens for users who use python2.x and python3.x without a virtual environment setup.
It would still be preferable to remove all the *.pyc
files generated during/after execution.
@palrohitg you can move forward with writing a piece of code for the same.
Avoiding any possible scope of bug would be a better decision for now.
@palrohitg , checking for status of work here?
@Kashish121 What I'm thinking for this issue is that instead of deleting those generated *.pyc files
we should prevent their generation in the first place.
@Kashish121 What I'm thinking for this issue is that instead of deleting those generated
*.pyc files
we should prevent their generation in the first place.
Please expand on this.
We can set dont_write_bytecode
of sys
moduleto
True`. I can create a PR for the same.
We can set
dont_write_bytecode
ofsys
moduleto
True`. I can create a PR for the same.
Sure! go ahead. 👍🏽