Open dtlindsey opened 4 years ago
Hi @dtlindsey, what version of PySide are you using? Also, do you see any errors in your build log or does this problem only show up when you run usdview? If you could post your build log from ../install/USD/build/USD/build_log.txt that might help us narrow things down.
Note also that attributeValueEditorUI.py and the entire attributeValueEditor are vestigial, not consumed by the usdview runtime at all.
--spiff
On Fri, Aug 7, 2020 at 9:50 AM Sunya Boonyatera notifications@github.com wrote:
Hi @dtlindsey https://github.com/dtlindsey, what version of PySide are you using? Also, do you see any errors in your build log or does this problem only show up when you run usdview? If you could post your build log from ../install/USD/build/USD/build_log.txt that might help us narrow things down.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/PixarAnimationStudios/USD/issues/1285#issuecomment-670609745, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPOU2FEASWUU4CHEH6XITTR7QWDTANCNFSM4PXKL32A .
This is the error when I try to run usdview in a terminal window (I have the pythonpath and path expanded to what's needed for OSX)
usdview -h Traceback (most recent call last): File "/usr/local/USD-20.05/bin/usdview", line 28, in <module> import pxr.Usdviewq as Usdviewq File "/usr/local/USD-20.05/lib/python/pxr/Usdviewq/__init__.py", line 29, in <module> from .qt import QtWidgets File "/usr/local/USD-20.05/lib/python/pxr/Usdviewq/qt.py", line 42, in <module> PySideModule = GetPySideModule() File "/usr/local/USD-20.05/lib/python/pxr/Usdviewq/qt.py", line 31, in GetPySideModule from . import attributeValueEditorUI File "/usr/local/USD-20.05/lib/python/pxr/Usdviewq/attributeValueEditorUI.py", line 1 /******************************************************************************** ^
Looking at the build log.txt, it looks like there are actually a number of errors that weren't reported when building. I'm attaching it here.
log.txt
Filed as internal issue #USD-6274
Thanks, @dtlindsey . Line 1101 of your log indicates that attributeValueEditorUI.py is being generated. Does the file /usr/local/USD-20.05/lib/python/pxr/Usdviewq/attributeValueEditorUI.py not exist? If not, I wonder whats going wrong between build and install...
Additionally, line 7111 indicates that attributeValueEditorUI.py is being installed:
-- Installing: /usr/local/USD-20.05/lib/python/pxr/Usdviewq/attributeValueEditor.py
-- Installing: /usr/local/USD-20.05/lib/python/pxr/Usdviewq/attributeValueEditor.pyc
Can you post what version of PySide you're using? Also, if you open the file indicated above there should be a line that says what version of uic was used, that would be good to know as well.
I am also having the same issue, but on Ubuntu 20.04.
Here are the steps I've taken:
sudo apt-get install cmake build-essential python3-pip glew-utils qt5-default
pip3 install pyside2 pyopengl
git clone git@github.com:PixarAnimationStudios/USD.git
mkdir ../installation
python3 USD/build_scripts/build_usd.py ../installation/
Building with settings:
USD source directory /usd_install/src/USD
USD install directory /usd_install/installation
3rd-party source directory /usd_install/installation/src
3rd-party install directory /usd_install/installation
Build directory /usd_install/installation/build
CMake generator Default
CMake toolset Default
Downloader built-in
Building Shared libraries
Variant Release
Imaging On
Ptex support: Off
OpenVDB support: Off
OpenImageIO support: Off
OpenColorIO support: Off
PRMan support: Off
UsdImaging On
usdview: On
Python support On
Python Debug: Off
Python 3: On
Documentation Off
Tests Off
Examples On
Tutorials On
Tools On
Alembic Plugin Off
HDF5 support: Off
Draco Plugin Off
MaterialX Plugin Off
Dependencies boost, TBB, OpenSubdiv
STATUS: Installing boost...
STATUS: Installing TBB...
STATUS: Installing OpenSubdiv...
STATUS: Installing USD...
Success! To use USD, please ensure that you have:
The following in your PYTHONPATH environment variable:
/usd_install/installation/lib/python
The following in your PATH environment variable:
/usd_install/installation/bin
PATH
and PYTHONPATH
environment variables, as instructed. Then, I try to run an example from the USD repo:
cd USD/extras/usd/examples/usdDancingCubesExample/
usdview dancingCubes.usda
usdview
command above:
Traceback (most recent call last):
File "/usd_install/installation/bin/usdview", line 28, in <module>
import pxr.Usdviewq as Usdviewq
File "/usd_install/installation/lib/python/pxr/Usdviewq/__init__.py", line 32, in <module>
from .qt import QtWidgets, QtCore
File "/usd_install/installation/lib/python/pxr/Usdviewq/qt.py", line 42, in <module>
PySideModule = GetPySideModule()
File "/usd_install/installation/lib/python/pxr/Usdviewq/qt.py", line 31, in GetPySideModule
from . import attributeValueEditorUI
File "/usd_install/installation/lib/python/pxr/Usdviewq/attributeValueEditorUI.py", line 1
/********************************************************************************
^
SyntaxError: invalid syntax
attributeValueEditorUI.py
file, it actually looks like it's a C file:
/********************************************************************************
** Form generated from reading UI file 'attributeValueEditorUI.ui'
**
** Created by: Qt User Interface Compiler version 5.12.8
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef ATTRIBUTEVALUEEDITORUI_H
#define ATTRIBUTEVALUEEDITORUI_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QStackedWidget>
#include <QtWidgets/QTextBrowser>
#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
class Ui_AttributeValueEditor
{
public:
QVBoxLayout *verticalLayout;
QStackedWidget *stackedWidget;
QTextBrowser *valueViewer;
void setupUi(QWidget *AttributeValueEditor)
{
if (AttributeValueEditor->objectName().isEmpty())
AttributeValueEditor->setObjectName(QString::fromUtf8("AttributeValueEditor"));
AttributeValueEditor->resize(400, 300);
verticalLayout = new QVBoxLayout(AttributeValueEditor);
verticalLayout->setContentsMargins(0, 0, 0, 0);
verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
stackedWidget = new QStackedWidget(AttributeValueEditor);
stackedWidget->setObjectName(QString::fromUtf8("stackedWidget"));
stackedWidget->setLineWidth(0);
valueViewer = new QTextBrowser();
valueViewer->setObjectName(QString::fromUtf8("valueViewer"));
stackedWidget->addWidget(valueViewer);
verticalLayout->addWidget(stackedWidget);
retranslateUi(AttributeValueEditor);
stackedWidget->setCurrentIndex(0);
QMetaObject::connectSlotsByName(AttributeValueEditor);
} // setupUi
void retranslateUi(QWidget *AttributeValueEditor)
{
AttributeValueEditor->setWindowTitle(QApplication::translate("AttributeValueEditor", "Form", nullptr));
AttributeValueEditor->setProperty("comment", QVariant(QApplication::translate("AttributeValueEditor", "\n"
" Copyright 2016 Pixar \n"
" \n"
" Licensed under the Apache License, Version 2.0 (the \"Apache License\") \n"
" with the following modification; you may not use this file except in \n"
" compliance with the Apache License and the following modification to it: \n"
" Section 6. Trademarks. is deleted and replaced with: \n"
" \n"
" 6. Trademarks. This License does not grant permission to use the trade \n"
" names, trademarks, service marks, or product names of the Licensor \n"
" and its affiliates, except as required to comply with Section 4(c) of \n"
" the License and to reproduce the content of the NOTI"
"CE file. \n"
" \n"
" You may obtain a copy of the Apache License at \n"
" \n"
" http://www.apache.org/licenses/LICENSE-2.0 \n"
" \n"
" Unless required by applicable law or agreed to in writing, software \n"
" distributed under the Apache License with the above modification is \n"
" distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY \n"
" KIND, either express or implied. See the Apache License for the specific \n"
" language governing permissions and limitations under the Apache License. \n"
" ", nullptr)));
} // retranslateUi
};
namespace Ui {
class AttributeValueEditor: public Ui_AttributeValueEditor {};
} // namespace Ui
QT_END_NAMESPACE
#endif // ATTRIBUTEVALUEEDITORUI_H
So, I am not sure why I have .py
files that appear to be C files in my installation. Here is some other information that may be helpful:
pip3 list
(I have other packages/dependencies that were installed through apt
):
Package Version
----------- -------
dbus-python 1.2.16
pip 20.0.2
PyGObject 3.36.0
PyOpenGL 3.1.5
PySide2 5.15.2
setuptools 45.2.0
shiboken2 5.15.2
wheel 0.34.2
As an update to my previous comment, I have tried to run the build again with Jinja2
installed (version 3.0.3), and with PySide2
set to version 5.13.2 (I thought version 5.13.2 would be worth a try based on what I read in https://github.com/PixarAnimationStudios/USD/issues/1111). I am still seeing the same issue as described above. I should also mention that I am using the release
branch of USD, on commit https://github.com/PixarAnimationStudios/USD/commit/faed18ce62c8736b02413635b584a2f637156bad.
I went ahead and tried building USD on Ubuntu 18.04 with python2 (I'm using Docker containers), and everything seems to work fine. So, maybe it's an issue with python3?
(if you'd like me to ticket a new issue for this because I'm on Ubuntu 20.04 instead of MacOS, let me know!)
just to add, I'm also seeing this problem in a few python files:
usd/21.5.0/boost.1.66.0/lib/python/pxr/Usdviewq/mainWindowUI.py
usd/21.5.0/boost.1.66.0/lib/python/pxr/Usdviewq/adjustClippingUI.py
usd/21.5.0/boost.1.66.0/lib/python/pxr/Usdviewq/adjustDefaultMaterialUI.py
usd/21.5.0/boost.1.66.0/lib/python/pxr/Usdviewq/attributeValueEditorUI.py
usd/21.5.0/boost.1.66.0/lib/python/pxr/Usdviewq/preferencesUI.py
usd/21.5.0/boost.1.66.0/lib/python/pxr/Usdviewq/primLegendUI.py
usd/21.5.0/boost.1.66.0/lib/python/pxr/Usdviewq/propertyLegendUI.py
They all have been generated as C source instead of Python source. I'm seeing this building USD 21.5.0 on a fedora35 docker, using GCC 6.3.1 (was built from the original Redhat DTS 6.1 GCC 6.3.1 source code with all patches), python 2.7 and Qt 5.15.2 (booth where built using the same GCC 6.3.1).
Is there any workaround for this?
Also seeing this error ^, which prevents me from running usdview
on macos
Still have the same error in ubuntu 20.04.4 LTS
usdview HelloWorld.usda
Traceback (most recent call last):
File "/usr/local/USD/bin/usdview", line 28, in
It is a pyside uic version issue (worked fine in uic version 5.15.2 but failed with 5.12.8). One workaround I found is to replace this line with
COMMAND "pyside2-uic"
or
COMMAND "pyside-uic"
I've run into the same issue using pyside6-uic from here.
That version also requires the -g python
argument.
I don't know if that goes for all versions of pyside 6 or if I have an unusual binary name because of the way I compiled it, but otherwise, adding a check for pyside6-uic
in this line does the trick for me.
Edit:
I remember why I had that binary name.
In this line in the findPySide.cmake
file, it only looks for pyside6-uic
, so I made a symlink that cmake would use.
If I change the file to find uic
instead as well, it also works without the change above.
Edit 2:
Turns out my pyside tools installation was just broken.
Normally, the pyside6-uic
binary is effectively a call to uic -g python
, which I borked by only building the pyside-tools` part of the repository with cmake directly.
Given that binary is the only necessary part, it's easy to work around.
Description of Issue
USD/lib/python/pxr/Usdviewq/attributeValueEditorUI.py is not being produced as a python file when building on OSX 10.14.6 and XCode Version 11.3.1 (11C504). This is happening on both v20.05 and v20.08 versions
Steps to Reproduce
System Information (OS, Hardware)
OSX 10.14.6 macbook pro
Package Versions
v20.05 and v20.08
Build Flags
--materialx --alembic --openimageio --opencolorio --no-docs --openvdb --build-args=boost,"--with-thread --with-system --with-filesystem --with-date_time" ../install/USD