-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ASCII code error #21
Comments
I am also getting the same error. I have now converted the entire repository to Python 3.8 using the |
same i tried using 2.7 and also 3.11 and 3.10 but same error |
this is relatively easy to fix. after some googling I found out that you can load python2 pickles in python3 by specifying the encoding: line 73-76 in sample.py with open(os.path.join(args.input_dir, 'charmap.pickle'), 'rb') as f:
charmap = pickle.load(f, encoding="latin1")
with open(os.path.join(args.input_dir, 'inv_charmap.pickle'), 'rb') as f:
inv_charmap = pickle.load(f, encoding="latin1") I just changed those lines + added brackets to all print statements and that was it. I get a different error, |
Did you solved problem with "TypeError: Variable is unhashable."? |
As far as I know it's caused by newer tensorflow versions. I "fixed" it by changing lines 28-30 of file - result = _params[name]
+ result = _params[name].ref()
i = 0
- while result in _param_aliases:
+ while result in _param_aliases.keys(): #not sure if this is required However now tensorflow has problems transforming the value into a tensor. in File "PassGAN/tflib/ops/linear.py", line 133, in Linear: I dont know enough about tensorflow to fix this. I tried using tf.identity to manually dereference the value, but that didnt work either. This project uses both python2 and outdated tensorflow versions. I dont know if its even worth the trouble |
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. 2023-02-24 12:27:40.098752: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT Traceback (most recent call last): File "/home/morpheuslord/Desktop/PassGAN-master/sample.py", line 74, in <module> charmap = pickle.load(f) ^^^^^^^^^^^^^^ UnicodeDecodeError: 'ascii' codec can't decode byte 0x83 in position 0: ordinal not in range(128)
So this is what error i am getting in addition with many bracket missing errors which were easy to locate and correct but this error i am not able to wrap my head around
The text was updated successfully, but these errors were encountered: