tiktoken
tiktoken copied to clipboard
fix pycache folder being added instead of encoding info files
Fix #61
CC: @hauntsaninja
@hauntsaninja please review
Any update on this @hauntsaninja?
@dheerajiiitv did you test this on aws lambda? I tried your changes in lambda with no success, same issue persists.
@AlexanderCollins I did not test it on AWS lambda. Can you check and debug the values in the filter list? And also how did you build the package with my changes?
@dheerajiiitv I get error in lambda while deploying through zappa
File "/var/task/summaryserver.py", line 13, in <module>
encoding = tiktoken.get_encoding("cl100k_base")
File "/var/task/tiktoken/registry.py", line 64, in get_encoding
_find_constructors()
File "/var/task/tiktoken/registry.py", line 44, in _find_constructors
Hey! Although this is not a solution for tiktoken
, you can work around this error by adding the following to your zappa_settings.json
file:
"exclude": [
"pycache",
"__pycache__"
]
Successfully tested on AWS Lambda.
Thanks but that gives this error: Runtime.ImportModuleError: Unable to import module 'handler': No module named 'werkzeug'
and Runtime.ImportModuleError: Unable to import module 'handler': attempted relative import with no known parent package
I deleted pycache file from seite packages main folder and tiktoken folders and it worked!
Hey @hauntsaninja, is there any update on this? When are we merging this?