Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

TypeError: expected str, bytes or os.PathLike object, not NoneType #2

Closed
Jayesh-Cldscle opened this issue Jul 4, 2023 · 3 comments
Closed

Comments

@Jayesh-Cldscle
Copy link

After running the command "python pantastic.py --dir test", it is not able to write output file

Traceback (most recent call last):
File "/Users/jayeshdesai/work-dirs/pci-pal/Pantastic/pantastic.py", line 114, in
sys.exit(main())
^^^^^^
File "/Users/jayeshdesai/work-dirs/pci-pal/Pantastic/.venv/lib/python3.11/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jayeshdesai/work-dirs/pci-pal/Pantastic/.venv/lib/python3.11/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/Users/jayeshdesai/work-dirs/pci-pal/Pantastic/.venv/lib/python3.11/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jayeshdesai/work-dirs/pci-pal/Pantastic/.venv/lib/python3.11/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jayeshdesai/work-dirs/pci-pal/Pantastic/pantastic.py", line 108, in main
pan_manager.scan_file_with_output(file)
File "/Users/jayeshdesai/work-dirs/pci-pal/Pantastic/pantastic/pantastic.py", line 64, in scan_file_with_output
self.output_handle = open(self.output, 'w')
^^^^^^^^^^^^^^^^^^^^^^
TypeError: expected str, bytes or os.PathLike object, not NoneType

Can someone please help me here?

@Centurix
Copy link
Owner

Centurix commented Jul 4, 2023

Hi, I recently did a quick upgrade from the older Python 2.x codebase to Python 3.

I've pushed some changes to address the file handling issue here and processing files better. Could pull master and give it another try?

Thanks!

@Jayesh-Cldscle
Copy link
Author

Hi, I recently did a quick upgrade from the older Python 2.x codebase to Python 3.

I've pushed some changes to address the file handling issue here and processing files better. Could pull master and give it another try?

Thanks!

Worked, Thank you so much!!

@Centurix
Copy link
Owner

Centurix commented Jul 5, 2023

no problems, best of luck with the PCI audits!

@Centurix Centurix closed this as completed Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants