![]() Output:But then, with other tests, I've realized that tect is actually detecting the encoding I pass to the bytes function. I've been working for long hours and I'm kind of stuck. PD: Please excuse me if I'm not being very clear about some things, just let me know and I'll clarify. HoursEnd ':' minutesEnd ':' secondsEnd ',' millisecondsEnd '\n'Thanks in advance. InList = hoursBegin ':' minutesBegin ':' secondsBegin ',' millisecondsBegin ' -> ' \ The lines where I do the replacement are the following: If some of you happen to have not seen an SRT file before, it looks like this: When I look for the character 0xda, I find it's a Ú however, that character is being read normally in other instances and I'm not even overwriting it. I'm thinking it's the new timestamps I'm writing that have this problem, but have no clue which character may be. I don't really know what "position 184" means, none of the lines is even longer than 33 characters, and line 184 of the file is an empty line with only an EOL character. I've been working with functions that convert and manipulate this kind of files for a while, but I had never gotten this error, just a similar one that I can't remember now, that's why I used the encoding="utf8". However, when I try to read the newly generated file to do a conversion to another format I have this problem. This function does this correctly and doesn't have this problem when reading and, when I create the new, corrected file, I'm just copying the old file and replacing the lines with timestamps with the corrected ones. I created a program that takes an SRT file and fixes the timestamps to eliminate overlapping because the editor does this sometimes. InFile = open(fileName, 'r', encoding="utf8")įileList.append(line)What I'm reading is a simple SRT file. I'm trying to read a text file with the following lines This is the error : 'UnicodeDecodeError: 'utf-8' codec can't decode byte 0xda in position 184: invalid continuation byte Return six.ensure_str(cPickle.dumps(data, **DUMP_KWARGS))įile "C:\Users\XXXX\AppData\Roaming\Shotgun\XXXX\\cfg\install\core\python\tank_vendor\six.I'm getting this error and have been looking online but don't really understand for my specific case and don't really know why this could be happening. Required_env = (ntext)įile "C:\Users\XXXX\AppData\Roaming\Shotgun\XXXX\\cfg\install\core\python\tank\context.py", line 1702, in serializeįile "C:\Users\XXXX\AppData\Roaming\Shotgun\XXXX\\cfg\install\core\python\tank\context.py", line 770, in serializeįile "C:\Users\XXXX\AppData\Roaming\Shotgun\XXXX\\cfg\install\core\python\tank\util\pickle.py", line 46, in dumps Launch_info = launcher.prepare_launch(app_path, app_args, file_to_open)įile "\\XXXXXX\_toolkits\_engines\tk-maya\v0.11.1\startup.py", line 137, in prepare_launch 11:07:40,192 Error calling _commands::nuke_12.1v2((), ):įile "\\XXXXX\_toolkits\_engines\tk-desktop\v2.6.0\python\tk_desktop\desktop_engine_project_implementation.py", line 210, in _trigger_callbackįile "C:\Users\XXXX\AppData\Roaming\Shotgun\XXXX\\cfg\install\core\python\tank\platform\engine.py", line 1083, in callback_wrapperįile "\\XXXXXX\_toolkits\_apps\tk-multi-launchapp\v0.12.0\python\tk_multi_launchapp\base_launcher.py", line 138, in launch_versionįile "\\XXXXXX\_toolkits\_apps\tk-multi-launchapp\v0.12.0\python\tk_multi_launchapp\base_launcher.py", line 405, in _launch_callbackįile "\\XXXXXX\_toolkits\_apps\tk-multi-launchapp\v0.12.0\python\tk_multi_launchapp\base_launcher.py", line 190, in _launch_appĪpp_engine, app_path, app_args, context, file_to_openįile "\\XXXXXX\_toolkits\_apps\tk-multi-launchapp\v0.12.0\python\tk_multi_launchapp\prepare_apps.py", line 51, in prepare_launch_for_engine Now on most machines we can launch, but for some unknown reason we can’t on others. So we’ve installed the newest version of SG Desktop and set the env var SHOTGUN_PYTHON_VERSION = 3.ĭesktop starts normally, but now on some machines we get the following error when we want to launch Nuke or Houdini. Which hasn’t been smooth to say the least… We’re in the process of updating the Pipeline to Python 3. We are using Shotgun and it’s pipeline for a couple of years now.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |