P4 PyQt Share Issues

We had some strange PyQt4/uic/widget-plugins/ errors that were pretty tough to track down. First off, we opted to get it into PYTHONPATH through Maya.env it was the only spot where it worked for us (PyMel is added there as well). If you have found a better way, feel free to comment.

If you add those libraries to source control like P4, do yourself a favor and go to PyQt4/uic/widget-plugins/. In source control, change all those files to binary→ check them out → overwrite them with the original files that has never been checked into Perforce→ Check in.

Yepp, I know they are .py files, but if you do not do this, you will get artist errors when PyQt runs EVERYTIME they sync those files. Not sure exactly what P4 is doing to them, but for us, checking out, setting P4 file type to binary, overwrite, and check in fixed the issues.

This one was a weird one to track down….
Feel free to explain why this is happening in the comments if you know the answer :) , I am dying to understand that one. A clue(?) is that the file size actually change when you P4 it as ascii….and we are only talking about the files in that directory.

/Christian Akesson

5 replies
  1. Fridi
    Fridi says:

    We had the same issue with PSA files (Unreal Engine animation files; actually binary but containing some ascii names).
    Our p4 admin sayd that p4 may try to zip/unzip files being checked in. And in case of ascii files it strips/adds some signs. Or so.

    We go the same way now, putting all .psa files on the p4 list of binaries to be on the save side. For .py we didn’t have the issue so we stay ascii to be able to diff against previous versions…

    Hope that helps

    Reply
    • cakesson
      cakesson says:

      Thanks for that comment Fridi. Yea one of our tech artists looked a little closer at the PyQt specific files and found that those files are missing character line returns (and are the only .py files to do so). One of our programmers advised us to test that that is indeed the issue and if so, let the owners of PyQt aware of the issue so that they can fix it in the source files. We have yet to confirm that this is what causes it, but I will post here if that is the case.

      Thanks,
      /Christian

      Reply
  2. Jesse
    Jesse says:

    When I diffed the files using Beyond Compare, I noticed that the files from the PyQt library use Unix line endings, and Perforce converts them to PC line endings based on the default clientspec settings (Perforce server stores everything as Unix and converts based on clientspec settings, according to the docs. By default this would convert the Unix line endings to PC, even if the original file was Unix).

    Anyway, I tested the Perforce version of the files (with PC line endings) in Python 2.6.4 and the uic files work fine, exactly like the original Unix line endings. However, copying these files to the Maya python path for use with mayapy breaks. So it appears there may actually be a bug in the Maya Python interpreter… Can anyone else verify?

    Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply to Matt Cancel reply

Your email address will not be published. Required fields are marked *