openerp pyc files not generated - compilation

Good morning to everyone, i am facing this problem:
Sometimes, after making modifications in my .py files, i restarted the server and saw nothing had changed. In fact the .pyc files were not regenerated so i want to know if someone can give me the good procedure to make that happens.
Now what I do is:
step1-add in eclipse params: --update=module_name
step2-click on settings ==> installed modules (the idea is to load the module again)
step3-be sure not to be in debug mode (you can remove debug from the address bar).
Could someone know how to do step 2 without using the web client (browser) i.e a way or a param to add when restarting the server so that the modules will be load again, because i remark that it is in this step that pyc files are regenerated.
Thank you in advance.

So reading between the lines, you are working in Eclipse and have changed and the pyc files are not new.
I would:
In Eclipse, Project -> Clean and clean your project.
Exit Eclipse and see if there is still a debug process lying about and kill it. These zombie debug processes happen if you terminate the server while it is stopped on a break point (in eclipse juno anyway, not sure about luna).
Either the eclipse builder will generate the pyc because that is part of building a project, or the Python vm will when it encounters the py file, or if a pyc exists it will check the times and ignore the pyc if it is older than the py. Updating the module may cause OpenERP to load that module and the python vm will generate the pyc but it doesn't matter whether you trigger this by updating the module when the server starts or just when you click on the function that triggers the piece of code.
One last suggestion, check your system time as the python vm is checking the file time stamps.

Related

Raylib project stopped being able to run

Raylib project in visual studio was working perfectly fine, as in if you run the project it would execute and create a window and the game would run, but after opening the project one day, after attempting to run the project the same error kept appearing:
LNK1104 cannot open file '..\bin\Debug.DLL\ProjectName.exe'
I've tried rebuilding the project but the same error keeps appearing and I am not sure why.
Any Answers?
one thing that has worked for me in the past is transferring use into VScode instead of VSstudio, also a linker error is usually file related, check ether your program is already running or is loaded in the debugger(close it and run debug again) or your library paths are incorrect or aren't wrapped in double-quotes(depends on the path, may need < >). would be more clear if you included some code at least the uses of directives.

Btrieve 6.15 (Win 95) does not autoload in VB 6.0 IDE environment

I've recently bought a new tower and used third-party software to port across all my development tools (another story in itself), including VB 6.0, all my third-party tools, and Btrieve. The only problem I have with Btrieve is more an annoyance than anything. On this new tower, I have to remember to run my compiled application once before attempting to run it from inside the IDE or else it will not load, and subsequently return a corresponding error when it attempts to open the first file.
If anyone else has encountered this and knows how to fix it, I'd much appreciate it.
After checking this page on Wikipedia I realized that I needed to focus on two files: w32mkde.exe and wbtrv32.dll
By manually running the exe file, it would load the engine and my application would then run in the IDE, but I still had to manually start the exe. The desired and original behavior on my older machine was that running my program in the IDE would automatically launch the sever exe. From the Wiki page, I learned that it was wbtrv32.dll that was actually called by the program, which in turn would call the exe if needed.
I had recentl ported over my old machine to a new tower, and many of the ocx and dll files in \windows\syswow64 did not make it. There seems to be no pattern to which ones, but I had to re-register those as I found them. There must be some link there, because when I copied-over the W*.exe and W*.dll files from my production backup folder to the syswow64 folder, it suddenly worked again. Likely just a corrupt copy of the dll file. I believe the reason that the compiled version ran correctly is because those dll and exe files were installed to the application folder, and were apparently okay, but not being invoked when run from the IDE.
Hope this might help someone else some day.

Strategies For Replacing Program Executable in Windows

I have a Windows program that needs to update itself from a server automatically.
It is already able to transfer files from the server and update + validate things like DLL plugin files before loading them.
However, this program also needs to update itself. There are probably a few different ways this could be done, and the most obvious one I've seen from various online game clients is creating an "auto patcher" that downloads and then runs the client executable. That introduces the problem of having to update the autopatcher, so if there is a more elegant solution I'd like to hear about it.
I have to imagine there is a way to download what will be the new executable file as a temporary file, let's say "client.exe.tmp" and then launch a separate process that waits for the original client.exe to exit and then renames/copies the new file over the top of it.
Has anyone done this sort of thing before successfully and what method did you use to get it to work?
Running exe downloads the new one, puts it somewhere
Running exe renames itself to anything (like .exe.tmp)
Running exe puts the downloaded exe where the running one is (named just like the original)
Running exe starts the downloaded exe
Downloaded exe checks for .exe.tmp file, if found deletes it and kills the old running process
Done
I like the patcher/maintenance/feature add/remove tool approach. Even if for some reason you need to update something as trivial, I see no "chicken or egg paradox" here, it is more of a "one hand washes the other" thing.
Application checks server for updates, if any, check if patcher is up to date, if needed, application updates patcher
Patcher is executed as a separate process, downloads the update, and notifies application to prompts to install it
You agree, application quits notifying the patcher, patcher unpacks data, replaces exe, does additional stuff that may be needed by the new version and launches it and terminates
Consider ClickOnce deployment which will help you to insall/replace/update latest version from shared location and executed.

I've been asked to deploy, but I cant make the magic happen

I've added a couple of lines to a file, let's say it builds to be foo.dll. It's part of more then one dll file, but it's the core dll. What I did was that I added a couple of lines so it should add some log data to the database. It should not affect any other files what so ever.
So i tried to deploy it. We don't have the magical one click deploy, we are just copying the right files to the right place.
So now, since i have a change in foo.dll, i thought for myself that i just could copy foo.dll and the server would be happy.
I was wrong. Browsing the website i now get "Generic Errors", dont know what that is. I've also tried to copy all the new dll files (4 i total) but that did not solve the problem either.
The error it gives are
Http Error 404.0 not found
Module: ISS Web Core
Notification: MapRequestHandler
Handler: Static File
Error Code: 0x80070002
replacing the new foo.dll with the old one solves the problem. and i've tried to restart the webserver. :-(
I asume you have "published" and not just "compiled" your Web?
You also need to take care off the "Solution Configurations": Debug and Release.
In a normal publish process you would change the configuration to release and publish your project into another folder.
After you have done that you just need to collect the desired files and upload them.
Keep in mind that you need the newest version of you web project. Maybe there are some changes online that your local project hasn'T. This would cause such problems.
We don't have the magical one click deploy
Why not? It's not magic, and it's pretty easy to set up. Get any continuous integration software (I would recommend BuildMaster since I am a developer for it and it's free now) and you'll never have this problem again.

How do you flush Netbeans synatx error information?

Opps: This is the same as: Is there a way to reset the error badges in Netbeans? but I don't know how to mark it as such ...
My version of NetBeans 6.9.1 is currently showing a large number of syntax errors in many files, in many projects.
But, if I look at the errors, they are invalid. For example, one error says that an import is referencing a non-existent file. However, that file exists and has no syntax errors.
More importantly, despite all of the errors, the code compiles cleanly and runs correctly.
My guess is that NetBeans is caching some data (OSGi?) that is out of date or has been corrupted. This has happened before, but in the past it wasn't this bad and it magically cleared itself.
I've tried starting and stopping NetBeans, but that doesn't do it. If, as in the above case, I use NetBeans to resave the imported file, it goes away after a minute, but for large projects this is very time-consuming. (Note that I am using jVi, and saving with that embedded editor doesn't not fix the problem, it has to be the NetBeans save command).
I'd really like to find a simple way just to force the whole internal state to refresh itself. Does anybody have any ideas?
To clear this error you need to shut netbeans, go to the .netbeans folder in your home directory C:\users\.netbeans for Win 7,
in there you will see a folder for the version you are using.
in there is a folder called var
delete this folder then re-run netbeans.
This clears the cache in Netbeans allowing it to re scan the folders correctly.
I found a useful plugin you can use called Cache Eraser.

Resources