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

Could not find match for YAML element PackageFolders #14

Closed
MegaThorx opened this issue Feb 18, 2016 · 37 comments
Closed

Could not find match for YAML element PackageFolders #14

MegaThorx opened this issue Feb 18, 2016 · 37 comments

Comments

@MegaThorx
Copy link

Could someone help me out with this one.
Didn't find anything in the readme

# Default values
# These can all be overriden by user config files

MaxProjectNameLength: 10

# Set to true if you don't want to use the Projeny editor DLL and instead want to link directly
# to UnityPlugin\Projeny
LinkToProjenyEditorDir: False

ReleaseSources:
    - AssetStoreCache:

PathVars:
    ProjTemplatesDir: '[ProjenyDir]/Templates'

    CsProjectTemplate: '[ProjTemplatesDir]/CsProjectTemplate.csproj'
    CsSolutionTemplate: '[ProjTemplatesDir]/CsSolutionTemplate.sln'

    PlaceholderFile1: '[ProjTemplatesDir]/Placeholder1/Placeholder.cs'
    PlaceholderFile2: '[ProjTemplatesDir]/Placeholder2/Placeholder.cs'

    ProjenyChangeProjectMenuMeta: '[ProjTemplatesDir]/ProjenyChangeProjectMenu.cs.meta'

    ProjectRootGitIgnoreTemplate: '[ProjTemplatesDir]/customProjectRootGitIgnore'
    ProjectRootSvnIgnoreTemplate: '[ProjTemplatesDir]/customProjectRootSvnIgnore'

    YamlDotNetDllPath: '[ProjenyDir]/Bin/UnityPlugin/Release/YamlDotNet.dll'
    ProjenyUnityEditorDllPath: '[ProjenyDir]/Bin/UnityPlugin/Release/Projeny.dll'
    ProjenyUnityEditorDllMetaFilePath: '[ProjTemplatesDir]/Projeny.dll.meta'
    ProjenyUnityEditorAssetsDirPath: '[ProjenyDir]/UnityPlugin/Projeny/Assets'
    UnityProjectsDir: 'F:\Dateien\Unity\Projekte'


    # Note that these are defaults, and can be overridden in any other Projeny.yaml file
    MsBuildExePath: 'C:/Windows/Microsoft.NET/Framework/v4.0.30319/msbuild.exe'
    UnityExePath: 'C:/Program Files/Unity/Editor/Unity.exe'

Console:
    UseColors: False
    OutputToFilteredLog: False

Compilation:
    UseDevenv: False

IncludeProjenyInGeneratedSolution: False

C:\Program Files (x86)\Projeny>prj --project Test --createProject

Initializing new project "Test"...
   Updating package directories for project Test...
      Project "Test" is not initialized for platform "Windows".  Initializing now.
      Initializing new project Test (Windows)...
      Failed during task:  initializing new project Test (Windows) (Took 0.0 seconds, time: 20:29:56, total elapsed: 0.0 seconds)
   Failed during task:  updating package directories for project Test (Took 0.0 seconds, time: 20:29:56, total elapsed: 0.0 seconds)
Failed during task:  initializing new project "Test" (Took 0.0 seconds, time: 20:29:56, total elapsed: 0.0 seconds)
Failed while processing config yaml for project 'Test' (platform 'Windows'). Details: Error: Could not find match for YAML element PackageFolders
Operation completed with errors.  Took 0.0 seconds.
@svermeulen
Copy link
Contributor

You shouldn't run prj directly from the Projeny install directory. The way its intended to be used is to add C:\Program Files (x86)\Projeny\bin to your windows PATH, and then execute prj in a new directory where you want to create your unity project, etc.

Did you try following the instructions here?

@svermeulen
Copy link
Contributor

If that link doesn't work just search for "How do I start an entirely new set of Projeny-based packages/projects from scratch?" in the docs

@MegaThorx
Copy link
Author

I didn't create a Projeny.yaml. I used the one from the installation folder 😄. I will test it if i'm at home.

@MegaThorx
Copy link
Author

Started Prj with arguments: --project ModdingGameClient --createProject
--------------------------
Initializing new project "ModdingGameClient"...
--------------------------
Making missing directories in path 'F:\Dateien\Unity\Projekte/UnityProjects/ModdingGameClient\ProjenyProject.yaml'
--------------------------
Updating package directories for project ModdingGameClient...
--------------------------
Project "ModdingGameClient" is not initialized for platform "Windows".  Initializing now.
--------------------------
Initializing new project ModdingGameClient (Windows)...
--------------------------
Loading schema at path "F:\Dateien\Unity\Projekte\UnityProjects\ModdingGameClient\ProjenyProject.yaml"
Processing dependency tree
Found 0 packages in total for given schema
Created directory "F:\Dateien\Unity\Projekte\UnityProjects\ModdingGameClient\ModdingGam-Windows"
Making missing directories in path 'F:\Dateien\Unity\Projekte\UnityProjects\ModdingGameClient\ModdingGam-Windows\ProjectSettings'
Making junction with actual path (F:\Dateien\Unity\Projekte\UnityProjects\ModdingGameClient\ModdingGam-Windows\ProjectSettings) and new link path (F:\Dateien\Unity\Projekte\UnityProjects\ModdingGameClient\ProjectSettings)
Executing 'mklink /J "F:\Dateien\Unity\Projekte\UnityProjects\ModdingGameClient\ModdingGam-Windows\ProjectSettings" "F:\Dateien\Unity\Projekte\UnityProjects\ModdingGameClient\ProjectSettings"'
Failed to initialize project 'ModdingGameClient' for platform 'Windows'.
Failed during task:  initializing new project ModdingGameClient (Windows) (Took 0.1 seconds, time: 14:08:02, total elapsed: 0.6 seconds)
Failed during task:  updating package directories for project ModdingGameClient (Took 0.1 seconds, time: 14:08:02, total elapsed: 0.6 seconds)
Failed during task:  initializing new project "ModdingGameClient" (Took 0.6 seconds, time: 14:08:02, total elapsed: 0.6 seconds)
'utf-8' codec can't decode byte 0x81 in position 21: invalid start byte

Traceback (most recent call last):
  File "C:\Projects\ModestTree\projeny\Source\mtm\util\ScriptRunner.py", line 18, in runWrapper
  File "C:\Projects\ModestTree\projeny\Source\prj\main\PrjRunner.py", line 171, in _runInternal
  File "C:\Projects\ModestTree\projeny\Source\prj\main\PrjRunner.py", line 78, in _runPreBuild
  File "C:\Projects\ModestTree\projeny\Source\prj\main\PackageManager.py", line 115, in createProject
  File "C:\Projects\ModestTree\projeny\Source\prj\main\PackageManager.py", line 149, in updateProjectJunctions
  File "C:\Projects\ModestTree\projeny\Source\prj\main\PackageManager.py", line 365, in checkProjectInitialized
  File "C:\Projects\ModestTree\projeny\Source\prj\main\PackageManager.py", line 471, in _initNewProjectForPlatform
  File "C:\Projects\ModestTree\projeny\Source\mtm\util\JunctionHelper.py", line 44, in makeJunction
  File "C:\Projects\ModestTree\projeny\Source\mtm\util\SystemHelper.py", line 88, in executeShellCommand
  File "C:\Projects\ModestTree\projeny\Source\mtm\util\ProcessRunner.py", line 107, in execShellCommand
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x81 in position 21: invalid start byte

Operation completed with errors.  Took 0.6 seconds.

Now i executed the following commands

F:\Dateien\Unity\Projekte>prj -cc
Initializing new projeny config

F:\Dateien\Unity\Projekte>prj --project ModdingGameClient --createProject

Initializing new project "ModdingGameClient"...
   Updating package directories for project ModdingGameClient...
      Project "ModdingGameClient" is not initialized for platform "Windows".  Initializing now.
      Initializing new project ModdingGameClient (Windows)...
         Failed to initialize project 'ModdingGameClient' for platform 'Windows'.
      Failed during task:  initializing new project ModdingGameClient (Windows) (Took 0.1 seconds, time: 14:08:02, total elapsed: 0.6 seconds)
   Failed during task:  updating package directories for project ModdingGameClient (Took 0.1 seconds, time: 14:08:02, total elapsed: 0.6 seconds)
Failed during task:  initializing new project "ModdingGameClient" (Took 0.6 seconds, time: 14:08:02, total elapsed: 0.6 seconds)
'utf-8' codec can't decode byte 0x81 in position 21: invalid start byte
Operation completed with errors.  Took 0.6 seconds.

F:\Dateien\Unity\Projekte>

@svermeulen
Copy link
Contributor

Can you attach the PrjLog.txt file? Should be in the same directory you are running prj

@MegaThorx
Copy link
Author

PrjLog.txt

I already posted it up there but here as an attachment

edit: well this is after i executed the pjr --init as you can see

@svermeulen
Copy link
Contributor

What version of windows?

@MegaThorx
Copy link
Author

Windows 8.1 Pro (German)

@svermeulen
Copy link
Contributor

That's probably related. I only tested on Windows 7 unfortunately. It's failing when it tries to create the directory junctions. What happens when you run this directly yourself?

mklink /J "F:\Dateien\Unity\Projekte\UnityProjects\ModdingGameClient\ModdingGam-Windows\ProjectSettings" "F:\Dateien\Unity\Projekte\UnityProjects\ModdingGameClient\ProjectSettings"

@MegaThorx
Copy link
Author

Does already exist. I deleted and recreated it with the command. Without any problems.

@svermeulen
Copy link
Contributor

What's the output from that command? It's failing when it parses that

@MegaThorx
Copy link
Author

Verbindung erstellt für F:\Dateien\Unity\Projekte\UnityProjects\ModdingGameClient\ModdingGamWindows\ProjectSettings <<===>> F:\Dateien\Unity\Projekte\UnityProects\ModdingGameClient\ProjectSettings

@svermeulen
Copy link
Contributor

Ah it's the "ü" character for some reason.

@svermeulen
Copy link
Contributor

Are you running from source or exe?

@MegaThorx
Copy link
Author

I'm running from exe

@svermeulen
Copy link
Contributor

This is a longshot but can you try running set PYTHONIOENCODING=utf8 in console then running the prj again?

@MegaThorx
Copy link
Author

Same error again

@svermeulen
Copy link
Contributor

Ok, I have a VM of windows 8, I'll try and repro it myself

@MegaThorx
Copy link
Author

Well i think the problem is the language. I will change it to english and test it again

@MegaThorx
Copy link
Author

F:\Dateien\Unity\Projekte>prj --init

Initializing project "ModdingGameClient"...
   Updating package directories for project ModdingGameClient...
      Finished updating packages for project "ModdingGameClient"
   Finished updating package directories for project ModdingGameClient (Took 0.2 seconds, time: 14:39:52, total elapsed: 0.2 seconds)
   Successfully initialized project "ModdingGameClient"
Finished initializing project "ModdingGameClient" (Took 0.2 seconds, time: 14:39:52, total elapsed: 0.2 seconds)
Operation completed successfully.  Took 0.2 seconds.

After i changed the system language to english

@MegaThorx
Copy link
Author

And change project results in a crash if the other project isn't initlized by unity

@svermeulen
Copy link
Contributor

It should initialize on first open. Can you post the log?

@MegaThorx
Copy link
Author

PrjLog.txt
And nothing happens at this point. Unity freezes at the old project

@svermeulen
Copy link
Contributor

I can't reproduce either of these issues. Can you provide repro-steps for the freeze you're talking about starting from creating an initial config?

@MegaThorx
Copy link
Author

I set my system language to english
Created the config "prj -cc"
Created a project "prj --project Test --createProject"
Opened the project with unity
Created a second project "prj --project TestSecond --createProject"
Clicked the refresh thing and waited until i can change to project with projeny
After this it freezed

You couldn't reproduce the utf8 thing? Did you change the system language to german?

Does projeny depend on some 3d-party stuff?

@svermeulen
Copy link
Contributor

Ok, changing to german allowed me to reproduce the utf8 issue so I'll fix that. Before that I was just outputting the bad character manually.

But no luck on the second issue. I'll try it with windows 8

@svermeulen
Copy link
Contributor

Projeny depends on some python libraries, but those should all be packaged in if you're using the exe build

svermeulen added a commit that referenced this issue Feb 20, 2016
@MegaThorx
Copy link
Author

output = stdoutData.decode(encoding='utf-8',errors='ignore').strip()

I changed the line 107 of ProcessRunner.py in mtm/util to the upper line and i have no error :P

@svermeulen
Copy link
Contributor

Oh are you running from source now?

This should be fixed in commit 009a20a

@MegaThorx
Copy link
Author

Yeah i downloaded it 30 minutes ago.
edit: The freeze when i start a uninitialized project is also gone

@MegaThorx
Copy link
Author

PrjCommandException: Error occurred during 'Updating directory links': 'charmap' codec can't decode byte 0x81 in position 21: character maps to <undefined>

Projeny.Internal.PrjCommandHandler+<ProcessPrjCommand>d__3.MoveNext ()
Projeny.Internal.CoRoutine.Pump ()
Rethrow as CoRoutineException: Coroutine Object Trace: PmProjectViewHandler -> PrjCommandHandler
Projeny.Internal.CoRoutine.Pump ()
Projeny.Internal.AsyncProcessor.AdvanceFrameAll ()
Rethrow as AsyncOperationException: Error occurred during async operation
Projeny.Internal.AsyncProcessor.AdvanceFrameAll ()
Projeny.Internal.AsyncProcessor.Tick ()
Projeny.Internal.PmCompositionRoot.Update ()
Projeny.Internal.PmWindow.Update ()
UnityEngine.Debug:LogException(Exception)
Projeny.Internal.Log:ErrorException(Exception)
Projeny.Internal.PmWindow:OnErrorOccurred(Exception)
Projeny.Internal.PmWindow:Update()
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

Well with your fix 009a20a you generate the following error.

ProcessRunner.py on line 108 works fine

        output = stdoutData.decode(encoding='utf-8',errors='ignore').strip()
        errors = stderrData.decode(encoding='utf-8',errors='ignore').strip()

@svermeulen
Copy link
Contributor

So you're saying that my fix 009a20a didn't work for you and I should change it to those lines instead?

I wonder if this would solve it too:

    output = stdoutData.decode(encoding=sys.stdout.encoding, errors='ignore').strip()
    errors = stderrData.decode(encoding=sys.stderr.encoding, errors='ignore').strip()

Would you mind trying that? I am not seeing this error.

@MegaThorx
Copy link
Author

    output = stdoutData.decode(encoding=sys.stdout.encoding, errors='ignore').strip()
    errors = stderrData.decode(encoding=sys.stderr.encoding, errors='ignore').strip()

Yes this works fine.

svermeulen added a commit that referenced this issue Apr 5, 2016
@svermeulen
Copy link
Contributor

Ok great. Thanks.

@mfdeveloper
Copy link

mfdeveloper commented Apr 22, 2016

Hello @svermeulen. I have the same situation now. Did you push this fix into the last release tag 0.3.3? I'm using Windows 7 with Brasilian language and I got the same utf-8 error :(

@svermeulen
Copy link
Contributor

Oh, oops, I didn't make a release for this fix. I'll do that today. If you don't want to wait for that you can install by source which should have the fix.

@svermeulen
Copy link
Contributor

Ok I made a new release. If you end up trying it, let me know if it addresses your issue

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

3 participants