Python Sample Won't Build

Hi @LouRohan ,

I’m having an issue with the newest updates of the connector sample.

All of my work so far has been in 100.2.0, but in a code cleanup effort, I’m rewriting my connector. I figured I would do it in the newest version (and with the material functions you provided here)

My issue is that when I run the build script the python version breaks and spits out errors in the console window.

I saw the reply in your update post regarding “$PYTHON$” and fixed that, but the errors here are typical traceback errors:

Traceback (most recent call last):
File “C:\Users\SNIC_KP\AppData\Local\ov\pkg\connectsample-101.1.6\tools\repoman\”, line 3, in
import argparse
File “C:\Users\SNIC_KP\AppData\Local\Programs\Python\Python36\Lib\”, line 89, in
import re as _re
File “C:\Users\SNIC_KP\AppData\Local\Programs\Python\Python36\Lib\”, line 123, in
import sre_compile
File “C:\Users\SNIC_KP\AppData\Local\Programs\Python\Python36\Lib\”, line 17, in
assert _sre.MAGIC == MAGIC, “SRE module mismatch”
AssertionError: SRE module mismatch

It seems like such a simple issue but I’m not familiar with how to resolve it.

All of these listed imports exist in my PYTHONPATH. Is this happening because I’m using python 3.6 and not 3.7?

All of this is to say: I’m working off of the C++ version of the sample and don’t even need the python version to work, but there’s only one build script for both apps, right?

My current solution is just copy/pasting the newer helloworld.cpp into my old directory but this feels like a very patchwork solution - plus I would like to tinker with the python version sometime soon.

I appreciate any insight you can provide!


The error you’re hitting here doesn’t really have anything to do with our Python Connect Sample, but rather with the build scripts that support building the sample on your computer. We do indeed use Python 3.7 with both the build process and the Connect Sample. It’s downloaded when prebuild.bat is run, which is before this is run. I wonder if your environment is setup to already define PYTHONPATH - this could be the source of the problem.

See if running build.bat from a cmd prompt works if you clear PYTHONPATH with something like:

1 Like

Yes! I have my PYTHONPATH set for working manually with Pixar’s USD API.

Thank you!

I’m not really an expert on all things Python, but I find that if you can it’s best to create launch scripts that use setlocal and set PYTHONPATH=required_path_for_use you have a much better experience.

1 Like