Repository: nvaccess/nvda

Issue:
impossible to start nvda_snapshot_threshold_py3_staging-17851,779ca15b.exe

### Steps to reproduce:
I would like to apologize if the call does not apply.
I am not a programmer, I work with computers and I am interested in testing the software.
I saw that on the nvda snapshot page there was a new branch
threshold_py3_staging
and wanted to test.
I downloaded the file and tried to run, but I get an error.
only one error sound is played, nor is a message displayed.
below is the error log.
this verdict of nvda does not start.
### Actual behavior:
pressing enter on the installation file causes an error sound to sound and not a message appears on the screen.
The temporary copy of nvda does not start and can not be installed or run as a temporary copy.
### Expected behavior:
nvda is installed and can be tested.
### System configuration
#### NVDA installed/portable/running from source:
installation file
nvda_snapshot_threshold_py3_staging-17851,779ca15b.exe
#### NVDA version:
installation file
nvda_snapshot_threshold_py3_staging-17851,779ca15b.exe
#### Windows version:
10 17763.557
#### Name and version of other software in use when reproducing the issue:

#### Other information about your system:

### Other questions
#### Does the issue still occur after restarting your PC?
yes
#### Have you tried any other versions of NVDA? If so, please report their behaviors.
no
log:
[nvda.log](https://github.com/nvaccess/nvda/files/3334708/nvda.log)

Python 3: unnecessary inclusion of win32wnet and pywintypes
Though the netbios module has been explicitly disabled in setup.py, py2exe still collects win32wnet and the pywintypes.dll Excluding win32wnet fixes this. Pull request will follow after fixes to py2exe that we rely on have been made.


Discussion:
@josephsl: Would you be able to have a look?


Resolving patch:
diff --git a/source/logHandler.py b/source/logHandler.py
--- a/source/logHandler.py
+++ b/source/logHandler.py
@@ -94,11 +94,15 @@ def getCodePath(f):
 	return ".".join(x for x in (path,className,funcName) if x)
 
 # Function to strip the base path of our code from traceback text to improve readability.
-BASE_PATH = os.path.split(__file__)[0] + os.sep
-TB_BASE_PATH_PREFIX = '  File "'
-TB_BASE_PATH_MATCH = TB_BASE_PATH_PREFIX + BASE_PATH
-def stripBasePathFromTracebackText(text):
-	return text.replace(TB_BASE_PATH_MATCH, TB_BASE_PATH_PREFIX)
+if getattr(sys, "frozen", None):
+	# We're running a py2exe build.
+	stripBasePathFromTracebackText = lambda text: text
+else:
+	BASE_PATH = os.path.split(__file__)[0] + os.sep
+	TB_BASE_PATH_PREFIX = '  File "'
+	TB_BASE_PATH_MATCH = TB_BASE_PATH_PREFIX + BASE_PATH
+	def stripBasePathFromTracebackText(text):
+		return text.replace(TB_BASE_PATH_MATCH, TB_BASE_PATH_PREFIX)
 
 class Logger(logging.Logger):
 	# Import standard levels for convenience.
diff --git a/source/setup.py b/source/setup.py
--- a/source/setup.py
+++ b/source/setup.py
@@ -198,11 +198,13 @@ def getRecursiveDataFiles(dest,source,excludes=()):
 			"serial.socket_connection",
 			# netbios (from pywin32) is optionally used by Python3's uuid module.
 			# This is not needed.
+			# We also need to exclude win32wnet explicitly.
 			"netbios",
+			"win32wnet",
 			# winxptheme is optionally used by wx.lib.agw.aui.
 			# We don't need this.
 			"winxptheme",
-			],
+		],
 		"packages": ["NVDAObjects","virtualBuffers","appModules","comInterfaces","brailleDisplayDrivers","synthDrivers"],
 		"includes": [
 			"nvdaBuiltin",


Test patch: