IyronPyton Error: Microsoft.Scripting.SyntaxErrorException: 'invalid syntax' - c#

I am using IronPython version 3.4 to run Python script in C#.
I get the following error when I call a script that uses the "Instagrapi" package.
Error: Microsoft.Scripting.SyntaxErrorException: 'invalid syntax'
The problem/error occurs when the following line is executed:
var actual = source.Execute(scope);
(When I run the script in Python IDE, it runs without problems)
I have long researched and found out that Instagrapi requires Python version >= 3.8 and Ironpython supports syntax from Python version 3.4. Can this be the problem? Is there a solution for this to make the script work?
I've been trying to solve the problem for several days but unfortunately without success. I hope someone can help.

Related

Compiling error in Geany IDE : While compiling Mono C# code Error code: Process Failed (The system cannot find the specified file)

Lately iam trying new code editors here geany is best and lightweight. My problem is with mono c# compiler Geany builds c,c++,java,php,ada,python code but having a problem while compiling to mono c# compiler.
on windows 10 64bit and i have also set environment path variables for mono c# compiler.
its showing the below specified error code:
Error code: Process Failed (The system cannot find the specified file)

Can i build C# projects on Ubuntu with Jenkins?

We have Jenkins running on an Ubuntu OS 18.04.01 LTS and an older project written in C# / .NET 4.5
The application was always build manually in the past and I would like to use Jenkins to introduce CI so nobody needs to build the project manually anymore. The application does not have to run on Linux or anything like that, we just need the buildfiles (executables and DLL files). Is it possible to build this C# solution with Jenkins on Ubuntu?
I know about MONO and XBUILD but actually I can't manage to build the project under ubuntu because of different issues which do not happen under Windows, e.g. see here:
UserControls/ExpandablePanel.cs(33,35): error CS1043: Invalid accessor body `=>', expecting `;' or `{'
UserControls/ExpandablePanel.cs(33,66): error CS1043: Invalid accessor body `=>', expecting `;' or `{'
UserControls/ExpandablePanel.cs(35,41): error CS1043: Invalid accessor body `=>', expecting `;' or `{'
UserControls/ExpandablePanel.cs(37,40): error CS1043: Invalid accessor body `=>', expecting `;' or `{'
UserControls/ExpandablePanel.cs(133,22): error CS1644: Feature `pattern matching' cannot be used because it is not part of the C# 6.0 language specification
UserControls/PagedDataGridView.cs(441,68): error CS1043: Invalid accessor body `=>', expecting `;' or `{'
1 Warning(s)
6 Error(s)
Is it even possible or do I definitely need to run Jenkins on a Windows machine?
It is possible. You can build C# project on Linux/Ubuntu. Try building using mono. When you will install mono package, one of the binaries that you will get will be xbuild. To build just invoke the following command:
xbuild <path to csproj/solution file>
Try building this manually first and then integrate with jenkins.

Facing issue on unity3d cmd line - executeMethod class could not be found

I am trying to build a Unity Project targeting Android platform from the cmd line. The C# script to build the project with the required options is titled PerformBuild.cs and is inside the project path. The class contains the method ConfigureBuildTestApp implemented.
$UNITY_PATH/Unity -quit -batchmmode -projectPath "$PROJECT_FINAL_PATH" -logFile -executeMethod PerformBuild.ConfigureBuildTestApp -buildTarget Android
The following error is observed in the build trace
executeMethod class 'PerformBuild' could not be found.
Argument was -executeMethod PerformBuild.ConfigureBuildTestApp
Any solution and/or reasoning for this problem? I followed the forum posts in the unity forum but none was helpful.
The script PerformBuild.cs
Compilation Errors were observed with the script above. Fixed the compilation errors and the revised script is shown below.
Revised PerformBuild.cs
The initial error for -executeMethod is still observed.
executeMethod class 'PerformBuild' could not be found.
Argument was -executeMethod
testIntegrationProject.PerformBuild.ConfigureBuildTestApp
(Filename:
/Users/builduser/buildslave/unity/build/Runtime/Utilities/Argv.cpp
Line: 295)
We had the "executeMethod class could not be found" error when a new plugin was used but was not present in the remote build server, causing all C# code to not compile, hence the error. Try manually building the project on the machine where you are building via command line and see if it succeeds.
Remove the namespace from class PerformBuild

gstreamer-sharp compilation : where to find glib-sharp 2.99.4?

I am running into a lot of trouble lately with gstreamer-sharp. I fail to compile it.
I am downloading the source from this github repo : https://github.com/gstreamer-sharp/gstreamer-sharp
The ./autogen.sh command fails with the following error
configure: error: Package requirements (glib-sharp-3.0 >= 2.99.4) were not met:
Requested 'glib-sharp-3.0 >= 2.99.4' but version of GLib is 2.99.3
So then I downloaded gtk-sharp from their repo (https://github.com/mono/gtk-sharp) because I could not find version 2.99.4 on my debian distrib.
I built it without issues, and installed it too. I have indeed the glib-sharp.dll amongst other, and I've installed it. But I still get the same error.
I even tried this command
PKG_CONFIG_PATH=/home/qrthur/build/gtk-sharp ./autogen.sh
Where I am certain I have my glib-sharp dll. But it still fails with the same error.
Some people managed to compile gstreamer-sharp-0.99 ?
For gstreamer-sharp 0.99 you will need gtk-sharp 2.99.2 If you want to compile gstreamer-sharp master you will need gtk-sharp master as well.

MonoDevelop: Semi cryptic error CS0016

Here's the error I'm getting:
Error CS0016: Could not write to file Fact.Apprentice.Core', cause: Type '<>__AnonType02' was not completed. (CS0016) (Fact.Apprentice.Core - Mono)
If I compile using MonoDevelop + Microsoft .NET, no such error shows up. When using Mono framework, I am unable to compile because of this. Behavior identical for Mac or PC installation.
This kind of error usually indicates compiler bug. The most likely source will be some of your LINQ queries. You could also try Mono 2.11 which should give you better error message.

Categories

Resources