Skip to content
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

Uncaught Error: ENOENT: no such file or directory, open 'C:\users\steamuser\My Documents/My Games... #134

Open
Ba-So opened this issue Nov 6, 2020 · 1 comment

Comments

@Ba-So
Copy link

Ba-So commented Nov 6, 2020

[Enter steps to reproduce:]

  1. launch atom and tabletopsimulator in any order
  2. open session in tts, save and load
  3. execute "Get Lua Scripts" in atom tts Plugin

Atom: 1.52.0 x64
Electron: 6.1.12
OS: "Arch Linux"
Thrown From: tabletopsimulator-lua package 12.4.3

Stack Trace

Uncaught Error: ENOENT: no such file or directory, open 'C:\users\steamuser\My Documents/My Games/Tabletop Simulator/Saves\ModdingShit\TS_Save_29.json'

At fs.js:126

Error: ENOENT: no such file or directory, open 'C:\users\steamuser\My Documents/My Games/Tabletop Simulator/Saves\ModdingShit\TS_Save_29.json'
    at Object.openSync (fs.js:447:3)
    at Object.func (electron/js2c/asar.js:138:31)
    at Object.func [as openSync] (electron/js2c/asar.js:138:31)
    at Object.readFileSync (fs.js:349:35)
    at Object.fs.readFileSync (electron/js2c/asar.js:580:40)
    at Object.fs.readFileSync (electron/js2c/asar.js:580:40)
    at Object.parseSavePath (/packages/tabletopsimulator-lua/lib/tabletopsimulator-lua.coffee:1867:26)
    at handleMessage (/packages/tabletopsimulator-lua/lib/tabletopsimulator-lua.coffee:1887:12)
    at /packages/tabletopsimulator-lua/lib/tabletopsimulator-lua.coffee:2114:9)
    at Socket.emit (events.js:200:13)
    at addChunk (_stream_readable.js:294:12)
    at readableAddChunk (_stream_readable.js:275:11)
    at Socket.Readable.push (_stream_readable.js:210:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:166:17)

Commands

Non-Core Packages

tabletopsimulator-lua 12.4.3 
vim-mode-plus 1.36.4 

Problem

Nothing is being loaded from tts saves,
Plugin is unusable for me (all linux users)

Ideas

it appears that the function parseSavePath in tabletopsimulator-lua.coffee at ll.1869 doesn't account for the fact that TTS is run on Proton.
The correct Path would be:

~/.steam/steam/steamapps/compatdata/268130/pfx/drive_c/users/steamuser/My Documents/My Games/Tabletop Simulator/Saves/ModdingShit/TS_Save_29.json

Therefore the script would need to do the following

  • realize it's being run on linux
  • expect a "faulty" windows-like path from tts
  • convert the path to linux syntax,
  • prepend the steam top directory "~/.steam/steam/steamapps/compatdata/268130/pfx/drive_c/"
    and then continue with the operations in ll.1867 and following
@Ba-So
Copy link
Author

Ba-So commented Nov 6, 2020

I'll get to figuring out how to fix it, if I can find the time during the weekend. Any way I can help, I'd be glad to!

I just spend 10 hours learning and programming inside the scripting window of TTS and that was no fun ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant