Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Issue on Output Json #113

Open
nuga99 opened this issue Aug 19, 2019 · 0 comments
Open

Issue on Output Json #113

nuga99 opened this issue Aug 19, 2019 · 0 comments

Comments

@nuga99
Copy link

nuga99 commented Aug 19, 2019

What's the problem (or question)?

  1. Problem on is_json() function in helpers/file_helper.py

Do you have an idea for a solution?

  1. Adding self because it's function based on class, and removed the open(json_file,'r')
    because OS cannot handled bigger file.
    So the new file_helper.py would be like this:
...
...
def is_json(self, json_file):
        try:
            print(json_file)
            '''
            using open for big file can result Error
            '''
            # with open(json_file, "r") as f:
            #     json_object = json.load(f)
           
           
        except ValueError:
            return False
        return True
...
...

How can we reproduce the issue?

  1. Run the VHostScan and give as the output Json `VHostScan -t -oJ .
  2. It will show an error TypeError: is_json() takes 1 positional argument but 2 were given

What are the running context details?

  • Exception traceback (if any):
if not file.is_json(output):
TypeError: is_json() takes 1 positional argument but 2 were given
NVolcz added a commit to NVolcz/VHostScan that referenced this issue Apr 28, 2020
Writing output to a JSON file is not working and due to the is_json errors
(see issue codingo#113). The function seems to check if the content of a file is JSON
but this seems not to be needed since file_helper will overwrite the file.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant