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

"can't create default.project.json" panic when exporting a place with no scripts #26

Open
Jaguar-515 opened this issue Jul 29, 2019 · 14 comments
Labels
bug Something isn't working

Comments

@Jaguar-515
Copy link
Contributor

Jaguar-515 commented Jul 29, 2019

After I select a folder, it returns this error:

thread 'main' panicked at 'can't create default.project.json: Os { code: 3, kind: NotFound, message: "The system cannot find the path specified." }', src\libcore\result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

Is this a normal error or did I do something wrong?

@Jaguar-515 Jaguar-515 changed the title thread 'main' panicked at 'can't create default.project.json thread 'main' panicked at can't create default.project.json Jul 29, 2019
@Kampfkarren Kampfkarren added the bug Something isn't working label Jul 29, 2019
@Kampfkarren
Copy link
Member

That's weird, can you record a video of you reproducing this?

@Jaguar-515
Copy link
Contributor Author

Alright, will do.

@Jaguar-515
Copy link
Contributor Author

image
Is an image ok? I don't want to reveal my real name for privacy reasons.

@Kampfkarren
Copy link
Member

It's tough for me to help since I don't know what you're actually doing to select the folder. Can you screenshot what you're selecting before it crashes?

@Jaguar-515
Copy link
Contributor Author

image
I am attempting to select this place.
image
I am attempting to select this folder.

@Kampfkarren
Copy link
Member

If you create a src folder in the folder, does this still happen?

@Jaguar-515
Copy link
Contributor Author

image
image
Yes.

@Kampfkarren
Copy link
Member

Kampfkarren commented Jul 30, 2019

That's super strange, it comes from this code:

fn finish_instructions(&mut self) {
let mut file = File::create(self.root.join("default.project.json"))
.expect("can't create default.project.json");
file.write_all(
&serde_json::to_string_pretty(&self.project)
.expect("couldn't serialize project")
.as_bytes(),
)
.expect("can't write project");
}

self.root uses the same path as self.source so writing to there SHOULD error first--I suppose there isn't anything in the src directory either, though?

Also, I'm assuming the place file actually has scripts inside it?

@Jaguar-515
Copy link
Contributor Author

The place file does not have any scripts inside it.
image

@Kampfkarren
Copy link
Member

That might be why. It's still weird that happens since there's tests to make sure that empty places work, but can you check if it works with places with scripts for you? For the time being, rbxlx-to-rojo is only useful for places with scripts anyhow.

@Jaguar-515
Copy link
Contributor Author

Alright, I'll do that.

@Jaguar-515
Copy link
Contributor Author

It works with places with scripts.
Oddly, it doesn't work with places without scripts.
image

@Kampfkarren Kampfkarren changed the title thread 'main' panicked at can't create default.project.json "can't create default.project.json" panic when exporting a place with no scripts Jul 30, 2019
@Kampfkarren
Copy link
Member

It's strange that this happens, but it's not a huge priority for me since you shouldn't be using this with places without scripts right now anyway.

If you're starting a place fresh, just learn how to setup Rojo on your own.

@Jaguar-515
Copy link
Contributor Author

Alright.
I already know how to setup Rojo on my own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants