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

SDK error and Code editor #1684

Closed
FERDA69 opened this issue May 2, 2020 · 24 comments
Closed

SDK error and Code editor #1684

FERDA69 opened this issue May 2, 2020 · 24 comments

Comments

@FERDA69
Copy link

FERDA69 commented May 2, 2020

I need help getting started,

When I ran the playground example the game wouldn't run because it couldn't find / couldn't access files.

The SDK wouldn't update because of a similar error and now after uninstall and reinstall the armory3D project explorer etc, do not show up.

Any help or insight is greatly appreciated!

@FERDA69
Copy link
Author

FERDA69 commented May 2, 2020

Also code editor wouldn't run because of access errors (I have the kode.exe pointed and couldn't figure out how to use VS)

@FERDA69
Copy link
Author

FERDA69 commented May 2, 2020

Update -
Reinstalled everything and project explorer etc show up again.

When I try to run the playground I get the message below:

Capture

and kode gives me some error with the Haxe:

image

@FERDA69
Copy link
Author

FERDA69 commented May 2, 2020

First update of SDK works but now gives the following when updating:

image

@MoritzBrueckner
Copy link
Collaborator

MoritzBrueckner commented May 2, 2020

Hi,

it looks like there are a few different issues here:

  • You should change the Kha path in the Kode studio settings to the path of Armory's Kha (YourSDKPath/Kha). Kode Studio unfortunately uses a very outdated Kha version.
  • Unfortunately I cannot reproduce the arm.SpawnBox error, maybe this is because of the setup problems you have/had. Did you run the playground file from latest version of Armory tutorials? What happens if you select the "Spawn" object in the scene and go to Properties > Object > Armory Traits and click on "Refresh"?
  • That WinError 145 is indeed a bug. I've looked into the problematic file and there is a line that only works on Unix based systems and on Windows it doesn't. If I get some time tomorrow, I'll take a look.
    Edit: It looks like thats probably not the issue. Is there any file from the SDK folder that was opened during the update? If not, can you try to change Line 177 of SDKPath/armory.py from
    return addon_prefs.sdk_path to return addon_prefs.sdk_path[:-1]. After that, restart Blender and see if it works (just a small chance but the error above looks a bit like that).

Thanks for reporting :)

@FERDA69
Copy link
Author

FERDA69 commented May 2, 2020

image
I'm not sure if I did the path correct but still have the error on Int16Array

image
I didn't notice anything happen when I refreshed

I do not think any SDK folder was opened during the update, I've changed the line and restarting
image
Build still fails.

I am going to delete everything and restart.

@MoritzBrueckner
Copy link
Collaborator

MoritzBrueckner commented May 3, 2020

I think I found the issue. You must extract the zip of the armory tutorials first (thats why the SpawnBox trait was not found) and the files should not be in the AppData/Local/Temp folder. The Kode Studio error is possibly also related to that.

@FERDA69
Copy link
Author

FERDA69 commented May 3, 2020

That might of been it, I don't remember if I unziped the folder originally, the game builds now.
I do still have two warnings that generate but not sure if its something I need to worry about.

image

Haxe is still generating an error in Kode
image
Should I try re-downloading?

I have not git bashed the folder and need some clarification what I'm doing when I do it
image

Which folder is it referring to
image

@FERDA69
Copy link
Author

FERDA69 commented May 3, 2020

image
Starting a new drawing and an error generates, the console still shows text when played in blender but when ran through Kode it shows this.

I think after I have Kode fixed I'm ready to get going, thanks for the help!

@MoritzBrueckner
Copy link
Collaborator

From where do you have this manual page? I think it is from the very old manual on armory3d.org?

The new manual is located in the wiki of this repository, there is also a page dedicated to using Git. You should never clone Armory directly into a Blender folder.

I have no idea what could cause the last error you described.

@FERDA69
Copy link
Author

FERDA69 commented May 4, 2020

I've made a lot of progress, thanks for the help!

image

It was from the old manual, can you explain this to me?
I somewhat understand github but don't know how to get it to function

image

Can you help me with this error?

Any direction on some better / most up to date tutorials?

@FERDA69
Copy link
Author

FERDA69 commented May 4, 2020

image

I am having an issue with the scripting basics tutorial

@MoritzBrueckner
Copy link
Collaborator

MoritzBrueckner commented May 5, 2020

Hi, what exactly don't you understand? How to execute the git commands?

First of all, you don't need to use the Git version, the monthly release should be sufficient to get started. The Git version is helpful if you want to use the latest features or want to help developing.

GitHub is not Git, GitHub is just one of many websites where you can host projects that use Git.
To execute git commands, you have to install Git first and after that start the command line/terminal of your operating system and navigate to a folder where you want the SDK to be.

In your screenshots, it looks like the SDK was installed to the Blender directory but you should not do that. Using Armory from a sort of protected path like C:\Program Files\... is error-prone. If you don't use the Git version, Armory will automatically detect the SDK path it was installed from upon install and link to it.

The build errors might be related to that path issue, I don't know.

@FERDA69
Copy link
Author

FERDA69 commented May 6, 2020

With the basic issues I'm having I think I'll manually update for now.

I've moved the SDK from C:\Program Files\Blender Foundation to C:\Users\Ferda\Documents\

I get a cache error a lot and just had a performance error pop up recommending another builder in Kode, I will see how moving the file improves things but any recommendations on improving things like that?

@MoritzBrueckner
Copy link
Collaborator

MoritzBrueckner commented May 6, 2020

Without knowing the errors in detail it is hard to guess what's causing them.

Caching in Armory (if that's what you're talking about) is a little bit unstable at the moment. Pressing the Clean button removes the cache, there is also an option to disable the caching altogether, it is called Cache Build and enabled by default.

What's that Kode error you're talking about?

@FERDA69
Copy link
Author

FERDA69 commented May 6, 2020

image
image

I'm not sure if this is Armory caching or Kode.

It seems like each time we use a new function it errors that function and after a few restarts it works again, but not sure.

@MoritzBrueckner
Copy link
Collaborator

I get the build cache error too - even in VS Code. But that's not a big problem usually.

Regarding the second error: If you think this is a Kode Studio bug, you should open an issue in the repository of Kode Studio, so Robert (the maintainer of that program) can fix it. But, it looks like there is also an error in your code. It is a little bit strange that iron.Trait is not found. Can you take a look in the SDK folder and see if the Iron subdirectory actually has content in it? If no, make sure to download Armoy from itch.io, the GitHub releases don't include submodules (I wonder why) so they are not really usable until GitHub implements this.

Maybe all of this needs way better documentation in the wiki, if you want you can improve it by sharing your findings :)

@FERDA69
Copy link
Author

FERDA69 commented May 9, 2020

I don't think it is problem with Kode Studio because I can start a project out of it and no errors show. I think it is something with my Haxe or maybe python.

image

Do I need a rendering path or anything else?

image
This is currently repeatable error when making a new project.

image
image
image
image

Any settings in Haxe that look wrong?
I'm not sure what json is but I keep seeing it trying to find errors...
image

image

@FERDA69
Copy link
Author

FERDA69 commented May 9, 2020

I am confident it is a setting error, once haxe caches I should have full function but cannot figure where it's wrong.
I am definitely going to add anywhere I think additional setting info is needed.

iron is in ArmorySDK

image

Watching some youtube videos on Kode and found that I should install node?
Not sure but thanks again

@MoritzBrueckner
Copy link
Collaborator

It's really strange..

Watching some youtube videos on Kode and found that I should install node?

You don't need to install node.js, it is not required.

My last idea: could you post the khafile.js of your project? Maybe there are some misconfigured paths.

@FERDA69
Copy link
Author

FERDA69 commented May 9, 2020

Here is the folder structure:
image
image
and
C:\Program Files\Blender Foundation\

Its not letting me attach the khafile.js
image
Let me know if this works!
Sources.zip

If it is a configuration issue what are some good rules of thumb to make sure everything is going and looking where it should?

I have multiple blend files in my test folder, when building a game would it be advisable to use multiple blend projects?

@FERDA69
Copy link
Author

FERDA69 commented May 9, 2020

I hope this isn't a user error... if there is not anything wrong in the khafile and you are available to it, I've really appreciated your help and if you could please reach out to the e-mail in my profile, I would be interested in more expertise

@MoritzBrueckner
Copy link
Collaborator

I unfortunately can't test your file as there is no blend file (so Armory doesn't work, there is nothing to export) and the khafile does reference your local, absolute paths. But it looks correct.

I still do not understand if you try to run the game via Armory's UI in Blender or with Kode Studio (the screenshots say Kode Studio but you said otherwise in some posts).

  • Can you run the Armory examples by now? If not, it is definitely a setup issue.
  • Can you enable Generate Relative Paths in Armory's setting and try again (you need to compile from Blender once for this to take effect)

Do you have discord? If yes, there is a Armory channel (better than doing support per mail and there are more people that can help): https://discord.com/invite/axq6qWV

@MoritzBrueckner
Copy link
Collaborator

Hi @FERDA69,

I now had the same issue you mentioned here and opened a pull request over on the Kha repository that hopefully fixes this: Kode/Kha#1206. May I ask to what target you were compiling?

Did you find a solution for the other issues?

@MoritzBrueckner
Copy link
Collaborator

@FERDA69 Please reopen if the issues still persists

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

2 participants