explodinglabs / jsonrpcserver

Process incoming JSON-RPC requests in Python
MIT License
187 stars 40 forks source link

FileNotFoundError request-schema.json #161

Closed programClown closed 3 years ago

programClown commented 3 years ago

After I pyinstaller my python scripts, run the exe file report can't find 'C:\\Users\\XXX\\AppData\\Local\\Temp\\_MEI83882\\jsonrpcserver\\request-schema.json'

bcb commented 3 years ago

This was asked in jsonrpcclient also, does it help you? https://github.com/bcb/jsonrpcclient/issues/155

programClown commented 3 years ago

Sorry, i meet the same error after change my spec file as follow

a = Analysis( ...
             datas=[('Lib\\site-packages\\jsonrpcserver\\request-schema.json','.')],
              ...)
programClown commented 3 years ago

Thanks @bcb ,i have solved it.

The spec file write as follow:

a = Analysis( ...
             datas=[('Lib\\site-packages\\jsonrpcserver\\request-schema.json','jsonrpcserver')],
              ...)

reference: #using-data-files-from-a-module

bcb commented 3 years ago

Great 👍