Closed oded86w closed 7 years ago
The common error here is forgetting to make a preferred table style called "GoReport" in your template.docx file, I will find and reference instructions from the user guide
The Word document is built from a template, template.docx. Place your template file, named template.docx, into the GoReport directory with main script. Your template should include a table style you want to use and heading styles for Heading 1 and Heading 1. Name your preferred table style "GoReport" and setup your Heading 1 and 2 styles. The headings do not need to be named, but can be renamed to "GoReport" as well as a reminder for yourself.
Feel free to create a custom style or use an existing style. The only thing that matters is a template.docx file exists and it has a "GoReport" table style.
To rename a style, right-click the style, select Modify Table Style, and set a new name
Do you have a working template ? The tamplate in this git empty.
@oded86w: This error means the gophish library is not available. Before you can use GoReport, you'll need to make sure you have that library installed. You can use GoReports requirements.txt file or run python3 -m pip install gophish
.
Make sure you use Python 3. If you use pip for Python 2, goohish will only be installed Python 2.x and won't work for Python 3 projects like GoReport.
Than I run this command I get
"Requirement already satisfied"
And than I run : python3 GoReport.py --id 8,7,5,6 --format csv --combine
I get the error :
Traceback (most recent call last):
File "GoReport.py", line 21, in
Hi,
Did anyone manage to find a fix for this? I too am suffering from the same problem.
I see @sharkmoos mentioned about having a GoReport style in the template.docx which I have, this didn't solve the issue.
@chrismaddalena mentioned about not having Python 2 which I don't, I have 3. (I have have 2 but I used the command sudo apt-get remove python2.7 to remove it)
I also used the 'python3 -m pip install gophish' that chris suggested however this produced another error, '/usr/bin/python3: No module named pip'
Any help with this would be much appreciated!
Thanks.
The GoReport table style in the Word template is unrelated to this. This is a Python error related to the gophish library.
@GregCFTS If you receive that error about pip
not being installed, try installing it. The method depends on your OS. If you're on Linux, you can usually do something like apt-get install python3-pip
.
You can test to make sure the gophish library is installed properly by opening a terminal and typing python3
(or whatever your Python 3 alias is) to enter a Python prompt. Type import gophish
and hit Enter. Does it import successfully or fail? If it is successful, you should have no trouble when running python3 goreport.py
, but if it fails GoReport won't be able to load the library at runtime because Python can't find it.
This is usually caused by the module being installed for a different version of Python than the one being used. This can happen easily on MacOS, for example, if you install a module using the built-in Python and then try running GoReport using Python installed via brew
.
Try importing gophish and see if it works.
I try to run report command and get error :
Traceback (most recent call last): File "GoReport.py", line 21, in
from gophish import gophish
ImportError: No module named 'gophish'