db.sqlite3 file encoding in django - django

I am beginner with Django and I'm using PyCharm IDE. I was watching a tutorial following along when I noticed my sqlite file that comes with Django had a question mark next to it (the guy in the video didnt have that). So I clicked it and it prompted me to associate my sqlite file with a certain file type. To experiment I selected the python(.py) file type. Now when I open up I get an error with corrupt code (or at least that's how it looks to me. The error is "File was loaded in the wrong encoding: 'UTF-8.'
When I click on that error message I am able to select from dozens of different encodings. I'm assuming that's the issue but I don't know for sure. Does anybody have a solution to this issue. Thanks.
I will add two screenshots to clarify what I mean.
Screenshot 1, list of options if I right click
Screenshot 2

Related

Wagtail Images Suddenly Not Rendering on Front End

I have just encountered an odd problem I'm trying to debug but cannot figure out what is wrong.
I have a wagtail site with images that were all working. At one point I refreshed the browser, and the images suddenly all disappeared from every page.
wagtailimages_tags is there
static is all loaded
the images are all in the correct media directory as specified and have been uploaded through the CMS
if i inspect element, the image is in fact coming through in the code perfectly.
But the site itself just does not show the image. I have checked the CSS and nothing has changed there and it is not hiding the image somehow.
My last resort - I actually started the project over completely in a new environment and added each application one by one to see if I could solve the issue ... nope. No images on the new install from scratch either!
No idea why all the images would suddenly just fail to appear in browser. Just seems super strange to me.
Any ideas on debugging appreciated.
Solved. The path to one of the js files had an extra /js in it and was not loading the file the page needed. The console showed and error and said it could not find /img.url - weird but the file in question where the error was found was the js file with the incorrect path.
This mistake caused every path to load perfectly but strategically blocked a few things globally that a little extra reading of the console would have helped me figure out sooner.
Fixed the .js file path and now all is good.

Watching Variables with same name in IAR watch window

Need some help, in one project I have started working on, I found that the same name variables (static defined) in separate files, and when I tried to add these variables into the "Live Watch" or "Watch Window", IAR display "Unknown or ambiguous symbol", which is for obvious reasons as it gets confusing which one to display as the same name is used in multiple files.
I searched over the internet and found one page.
https://www.iar.com/support/tech-notes/debugger/resolving-variables-with-same-name-in-c-spy/
And it works fine when the files are in the project directory, if the same name variable is inside some folders, then I am not able to access the variables.
Can anyone please suggest what is the correct format to access these variables?
Thanks in advance.
In the above project, there was a mistake done by me, the filename name is "tes2.c" the "t" is missing, and due to this it was not working.
if I type tes2\testvarI am getting the output, so it was my mistake.
But there is some more point, which I got after contacting the IAR support team, and I will share this information below.
If the "pre-include" file is specified in your IAR IDE, then this doesn't work, this is a known issue and is present till now, and they will fix this in the next upcoming releases.
Actually, in my main project, there is a "pre-include" file and that's why even after entering the correct information, I am not getting the proper data on the "Live Watch" or "Watch Window". The example shown here was a demo project to show the issue I am facing.
Now there is another possibility to view/watch the static variables.
Click on "View" --> "Statics" this will list down all the status variables in your project and this works well even when the "pre-include" file is included in the IAR IDE.

Codelite page gone blank

I have been writing code in codelite for c++ since past 20 days, today morning while writing code, by mistake i clicked somewhere and the top menu of options and side menu of projects vanished. I tried many things but i couldnt get them back. I am not a technical person and learning c++ from a tutorial. Now my codelite page is blank and i am stuck. I have unistalled and installed again but when i opened it, it still shows the blank page . I dont know what to do. Is there any history i need to delete from my laptop(for reinstallation) or need to do something in codelite , to get back default codelite page which comes when newly installed.Please help.
might be a little late here but I think I had your problem, if someone encounters similar
Double check what "perspective" you are on
Ctrl + M key can minimize several open views such as the "workspace view" and the "debugger view"
It's pretty simple, this happened to me too. It happens just because you are on full screen mode, and because you are currently in the workspace folder in which your source code is. Just follow these:
press Alt+M to you exit full screen mode. You should now be
able to view the top menu.
now go to view in the top menu and click on the Workspace pane.
After the Workspace pane appears, you will notice that you are now
in the workspace folder rather than on the source code file. Now, to go
to the file, click on the workspace on which your file is, click on
the project name under which your source code is, click on src,
then click on the file, e.g. main.cpp
Post your doubts if you still have any

Cloning Open Cart admin language issue

I'm trying to clone one fully functioning opencart website to another. The front-end of the website is in Dutch and the back-end I have left English default.
Here are the steps I have taken:
Copy database to new environment
Copy files and edit both the config files(config.php and admin/config.php) to match the server paths.
when i go to test the site, all seems to be working fine, until i go to the admin section where i find this blasted error which seems to be very common:
Notice: Error: Could not load language dutch! in /opt/www/prezent/graviolashop.de/HTML/system/library/language.php on line 39
I'm not sure if this is a path issue or something wrong with the db?
I have googled this issue but none are specific to my perticular case. Has anyone had this issue and resolved it?
Thanks.
If it's unable to load the language and you've copied them over as you say, then this is going to be a config issue. Ensure your path is exactly as it should be. A good way to do this is to create a file such as error.php in your root website folder. Then put some erroneous code in it like
<?php
dfs sdf sd;
Then call the file at www.yoursite.com/error.php, and it will show you the path in the error which you can copy exactly. One other unlikely but possible problem could be permissions, but the former is far more likely

In Sitecore 7.1 when I try to open the media library browser to insert an image a popup says the item was deleted

I have a simple template inheriting from Standard Template with an Image field. After creating a new item, when I go to add content and click on the field's toolbar item Open Media Library I get a message telling me The selected item could not be found. and suggesting that another use deleted it.
I am the only user on the installation, and the item is definitely there. I have done a few other Sitecore installs to make sure it's not just a corrupt project, and I've checked the logs to no avail.
I'm using Sitecore 7.1 rev. 130926 (the latest version as of this writing). I've done extensive searching and can't find anybody reporting a similar issue - my guess is it's a simple configuration (botched ID or path?), but I can't seem to locate it by scanning the configs for relevant keywords.
There are other issues with using the Browse editor, but I believe this is related to the missing Media Library item. The File Selector and other reasonably equivalent editors do not fail so I don't think it's a browser configuration. I've tried on Chrome, IE and Firefox and all respond the same way.
Any suggestions on further courses of action would be greatly appreciated!
I was also facing the same error, following are the step i have done to resolve.
1) I upload all my Images in the Media image folder
2) I have publish this folder.
3) Clicked on the Browse Button-> My Images
4) On Right hand side you will find the Tree view Icon above the Search Box
5) Click on it will see the Media Library with Tree consisting of all the Images.
6) Select the Image from that.
7) After this image get displayed in Image box,
8) Now click on Open Media Library Box and it will not give the error.
On your 'simple template' check the standard value for your Image field on your data template. It may be that it is pointing to a path which does not exist in your media library.
Figured it out, but it took an install on a completely separate machine and a comparison of the entire folder/file structure. There are two Sitecore XMLs that get written to the bin folder: Sitecore.Client.XML and Sitecore.Kernel.xml - both contain Sitecore assembly definitions, but the ones on my machine were not being generated properly. Once I copied the files over to my local install everything started working as expected.
So, the short answer is: a corrupted installation.
I frankly have no idea why the files would differ from my machine to another - once this project is finished, I'll have to do some research and report back. I have several Sitecore versions installed, and it could be a conflict between versions or dependencies? If I find anything, I'll make notes here.