Could not find QtWebEngineProcess.exe - python-3.x

I was building an application(Equation solver) in PyQt5 which contains two frames.
The first frame works just fine but the 2nd frame contains a QWebEngine widget which worked fine when I directly ran it from the code in my code editor but when I converted into an .exe
file using cx_freeze, on running the second frame I get an error saying "Could not find QtWebEngineProcess.exe" .
I did a little bit of digging myself and found out that its quite common actually, even found a question similar to this in stack overflow : here.
I tried adding the qt.conf file but to no avail, the error still persists.
I am at a loss here, been working on this for so long and now this error really ruined the flow.
I would be very grateful for any kind of help.
Thanks.

Related

Why won't my one simple custom user Python snippet '__init__' appear in IntelliSense?

I've spent the last two hours trying to figure this out, but nothing I've found online helps. Either all search results I've found were severely outdated, not relevant to my problem, or didn't work.
I am a complete beginner to Python, so please try to make your suggestions/solutions/answers understandable enough for me (i.e. draw them in crayon if you must.:)) I want the init method to not autocomplete all of this:
__init__(self, *groups: _Group) -> None:
super().__init__(*groups)
I want it to simply autocomplete as "init()" and that's it, nice and clean for what I'm currently doing.
Searching around, looking at other python snippet extension files, and even using a snippet generator, I've
found that this should be the code that I should use:
"__init__ method":
{
"prefix": "__init__",
"body": ["__init__($0)"],
"description": "New __init__ method"
}
I've created a global.code-snippets file and even a python.json file with Configure User Snippets, both of which are located in C:\Users<myusername>\AppData\Roaming\Code\User\snippets. However, it does not show up when I type out init, instead I still get the default suggestions:
Default init suggestions
What am I missing? I didn't think this would be so difficult.
I've looked at https://code.visualstudio.com/docs/editor/userdefinedsnippets, I've tried https://snippet-generator.app/, I've checked out other Python snippet extensions to see how they were written out.
A bit more digging around and using different keyword searches this morning brought me to IntelliSense in Visual Studio Code, and 3/4 of the way down there was Suggestion selection which said to use the editor.suggestSelection setting. Turns out it was disabled. Once I enabled it, both my python.json and global.code-snippet suggestions showed up.

Issue with viewing data transformation with PyTorch

I am currently trying to process data for a simple network. This is the code I entered:
Screenshot here
I keep getting this error message but can't find any syntax problems or anyone else with this issue, I'm guessing it's something to do with my vienv because I've seen tutorials of people with no issues and that exact code. It's possible I haven't imported a package into my IDE and I am using anaconda and PyCharm if that helps.
Anyway, this is the error message I keep getting.
Error Message
You need to use transforms.ToTensor() instead of transforms.ToTensor when passing to transforms.Compose.

No module named 'line_profiler._line_profiler' when calling line_profiler

I intended to test my code with line_profiler in the following way in Pycharm but got an error just like the title said. I tried in both miniconda 3.8 and python 3.7 (Windows) but got the same error and I don't know how to fix that. I visited the github page where the source code lies and also tried to run my python file as a script. In the end, all attempts failed because of this error. It seems like a bug but I found everything is Okay in Colab. Can anyone give me any advice? Feel free to leave comments and I will appreciate that.
lp = LineProfiler()
lp_wrapper = lp(Solution) # Solution is the name of self-defined function
lp_wrapper()
lp.print_stats()

Loadframe Fails at CreateEx for no apparent reason in CMainFrame

Okay so my MFC application was working fairly well until I cleared the application from the system registry. Now I am unable to run the program. Whenever I try running the program I get an exception. Checking the stack I noticed that CreateEx in LoadFrame for CMainFrame was crushing. This crash occurs when ProcessShellCommand is called in the derived CwinApp of the application.However, I have not been able to pinpoint the exact cause of the crash. I have a hunch it might have something to do with the loading of resource but I don't know exactly how. I have checked the .rc include file and it looks fine to me. I just don't understand how clearing the registry could cause such a mess. Been at it for the past 4 hours.
So basically I am asking if any of you have faced this problem before, and how did you managed to fix it without starting right from scratch? I am not sure of the exact part of the code I should put here to clarify my question so I hope this is clear enough.
Thanks

Issue with basic AS3 workers classes

I have followed Lee Brimelow's tutorials (part 1, part 2), but somehow my project doesn't work as expected.
Currently, publishing "src/Secondary.as" to "www/assets/swf/secondary.swf" works properly, however when trying to run "src/Main.as", an error shows up:
Exception fault: TypeError: Error #1007: Instantiation attempted on a non-constructor.
at Main/init()[/Volumes/DOCUMENTS/Tests/AS3/test-workers/src/Main.as:52]
at Main()[/Volumes/DOCUMENTS/Tests/AS3/test-workers/src/Main.as:32]
If anybody has time, you can look at my code on Github and maybe see where I screwed up? Thanks a bunch!
As your error message says: the problem raised in Line 52 in your Main.init()method. What you try to do there is to create a new instance of SecondarySWF. I would say that your embedment of Secondary class into SecondarySWF doesn't work properly, so it is not available in your init-method. You should set a breakpoint at the first line of your init-method and when the debugger reaches this point check what's in SecondarySWF. I expect that there's nothing in that variable, so what your new SecondarySWF() then means actually is new null().
Because you embed your secondary.swf with a MIME-type specified the Flex compiler ignores it because it is unable to detect the actual type of data in the loaded file. I found this post on Adobe's cookbook page that explains what you have to do in addition to adding the file using [Embed]. Hope this will fit your needs.

Resources