I wrote some code in PyCharm and when i tried to register plugin i got Error: (invalid syntax (, line 1)).
The reason was that file contained \r\n tags instead of just \n.
I solved this problem by changing pyblish_base\pyblish\plugin.py:
From: six.exec_(f.read(), module.__dict__)
To: six.exec_(f.read().replace('\r', ''), module.__dict__)
I`m on Windows 7, using pyblish_lite with maya 2013.
I got the same error when i opened default plugins in pyblish_base/pyblish/plugins by WordPad and resaved them, thats why i decied to check file syntax.
Wordpad and other rich-text editors append additional metadata to plain text files that may break your source code. Try using a plain text editor or IDE, such as Notepad or Sublime Text.
Thanks @sega, I pasted the code here for completeness, but the file is kept in the history of the edits.
I’ll take a look at this soon, but for now, are you able to copy/paste the above into a new file and save that? This seems like an issue with this particular file. Worst case, try saving it in Notepad, and have a look at whether PyCharm has any settings for line-endings.