geodjango gdal 3 coordinates order changes - django

Ive been setting an existing geodjango project in ubuntu 20.04, and the existing databases, fixture created, are all read backwards, (lat, long) (long,lat), I finally found the change and its the gdal verison, I was working with the 2.4 version, in ubuntu 20 I have the gdal version 3, and the change seems to be intended:
GDAL 3.0 Coordinate transformation (backwards compatibility (?))
as a workaround there is a SetAxisMappingStrategy(OAMS_TRADITIONAL_GIS_ORDER) method
my question is, how do I setup my project for existing and new models being read correctly?, since the backwards reading exist in the admin, pages, serializers, etc
thanks

It seems this problem has been fixed in Django 3.1 by this commit.

Related

Microsoft ML can't use opset 11 despite nuget package installed

I'm trying to build a simple object detection runner, really just following this MS Docs guide: https://learn.microsoft.com/en-us/windows/ai/windows-ml/tutorials/tensorflow-deploy-model
I already figured out building the View and adding capabilities so the provided code actually compiles.
Just one more problem right now: When creating the session, it crashes claiming "Unknown model file format version" which seems to translate to "Opset of the model you use is not supported".
Looking at github issues google showed me, I'm supposed to install the Microsoft.AI.MachineLearning nuget package and all is well. Except when I installed it, nothing changed.
So, what's left to do beside open yet another github issue? I already re-exported my model from opset 15 to opset 11 because the nuget package only supports that.
I'm on windows 10, UWP targeting 2004.

Sitecore Glass.Mapper.Sc vs Glass.Mapper.Sc.Core

Hi Fellow Sitecoryians ,
I'm in the process of upgrading a website sitting on Sitecore 7.1 rev140130 webforms to Sitecore 8.2rev160729 MVC-5 / Webforms hybrid. I require to keep the old content running. Because this is just an upgrade of the backend. But plan to start developing in MVC for all new components etc. I will phase out the old web forms as content pages change. This requirement is pushed on me by the business.
The old site used Glass Mapper to generate and map content from sitecore. Using the old Glass.Mapper.Sc.CasteWindsor v3.2.1.21 via t4 scripts in TDS.
I looked over the Glass homepage. Where is states that Glass.Mapper.Sc is all that you require now. But there are conflicting tutorials out there stating you need to install the MVC-4 or MVC-5. I figured I would ignore them for now and stick to the Glass suggested install.
Trouble is that the old Model properties are tagged with attributes like
[SitecoreId] & [SitecoreInfo(SitecoreInfoType.Language)]
Which don't seem to be in the Glass.Mapper.Sc library. The only reference I can find of these attributes in the available nugets packages. Is the Glass.Mapper.Sc.Core package.
I tried to install that package in the models project. Just to see this :
Start package installation to project [project].Logic.Models
Installation failed. Rolling back...
Error: Unable to resolve dependencies. 'Glass.Mapper.Sc.Core 4.2.1.189' is not > compatible with 'Glass.Mapper.Sc 4.3.1.194 constraint: Glass.Mapper.Sc.Core (≥ > 4.3.1.194)'.
Installation finished.
I feel like I might be making a mistake if I down-grade the Glass.Mapper.Sc so I can install the Core library. I might be shooting myself in the foot later on. Because I still have to install WFFM and Social Connection Module being replace with the internal sc8 social components..
My understanding was that the new Glass.Mapper.Sc package should cover all my needs.
So should I down grade and try and use the older version with the Core libraries?
Or should I refactor the models to use a new attribute system. What ever that may be?
(Keep in mind there are around 50+ models in the project. So it's not something that I would like to have to do .. )
Glass Mapper was significantly changed in version 4 and the biggest change was the removal and reliance on Castle Windsor. A list of the changes were listed in the release blog post.
The Nuget package/installer has also been changed so there is now only a single Nuget package instead of the several which you previously had to install. To support this, the Nuget installer checks for the presence of Sitecore.Kernel.dll and System.Web.Mvc:
To make things simpler V4 uses a Powershell script to decided which references to add to your project, it checks both the Sitecore.Kernel version and the System.Web.Mvc version and then installs the appropriate Glass.Mapper.Sc and Glass.Mapper.Sc.Mvc assembly.
My suggestion would be to remove the old V3 assemblies and Nuget references, make sure the above 2 DLLs are correctly referenced in your project(s) and then install Glass V4 Nuget to those projects again.
The SitecoreId and SitecoreInfo attributes are still in the Glass.Mapper.Sc library, the Core library has been removed/refactored. I don't believe this namespace has changed since V3 but make sure you are using the GlassV3Header.tt file and the using Glass.Mapper.Sc.Configuration.Attributes namespace is correct in that file.
https://github.com/HedgehogDevelopment/tds-codegen/blob/master/Sitecore.Master/Code%20Generation%20Templates/GlassV3Header.tt#L32

attributeerror 'module' object has no attribute 'python_2_unicode_compatible'

I was trying to start my django server, but constantly getting the above error
django version is 1.5 (due to my project's backward compatibility issue, we cannot upgrate it to a newer version)
python version is 2.7.7
I've searched online and find that usually, this is due to Django version, once switched to 1.5, it'll be fine, but for me, it's still there.
Any help please?
Never mind, I solved this problem by creating a python27_env virtual environment and pip installed all required modules, and then it worked.
I'm guessing it's due to something got messed up in my desktop setup for python27.
Thanks guys.

Porting from pcl-1.5 to pcl-1.7

I am using ubuntu14.04. I have a code which is written in pcl-1.5. I now want to run it in pcl-1.7. It's giving a lot of compilation errors.
Is there a way to port my classes and functions from pcl-1.5 to pcl-1.7?
I understand that you want to build your project on PCL 1.5 while PCL 1.7 is installed. This is possible. I assume you install PCL 1.5 from source and then build it so that it ends up with a build directory. These instructions are vague because it has been a while since I have done this but here they are: In the project you are trying to build (I am assuming you are using cmake), put something like the following line before the line find_package(PCL REQUIRED) (or the similar line that you have):
SET(PCL_DIR /path/to/pcl1.5/build CACHE LOCATION "Where the PCL version I want to use has been built to")
---Edit based on comment---
Okay, so it seems by PCL 1.5 code you mean code that you have previously written for PCL 1.5 and want to run with PCL 1.7. This should be possible but those with a good knowledge of the main differences between 1.5 and 1.7 probably will not have the time to answer this question. As such I suggest you check the errors as they come up during compilation and running and check the new API for the new way of doing things. It will be easier to locate the errors if you compile your project bit by bit. If you understand what the code is doing it will be easier also. That is all that I have.

Django 1.6 - admindocs and SITE_ID generates error in views section

Django 1.6 disabled the formerly automatically enabled sitesframework. This introduced a bug in the views section of admin docs.
The maintainers have already fixed and closed it
https://code.djangoproject.com/ticket/21386
I have a fresh pip install of 1.6, but the error is still present. My guess is that the fix is currently not built into the latest stable available over PIP?
My question is: What way would you suggest to get that fix into my running setup? (If possible I'd like to leave it on PIP instead of checking out django directly from Github)
Solution from the maintainers
If someone stumbles upon this issue see bouke's reply on the official ticket:
https://code.djangoproject.com/ticket/21386#comment:8
Setting SITE_ID=None in your settings.py solves the error.
This was fixed in the master branch, which is the place where development toward the new major 1.7 release happens. This means the problem will be fixed in 1.7, but the version is not out yet, and won't be for the next couple of months.
You may try asking the Django team (politely!) to backport the change to the stable/1.6.x branch, since its not a new future, but just a fix for a problem in 1.6. Changes in this branch will be included in the minor 1.6.2 release, when it comes out.
My question is: What way would you suggest to get that fix into my
running setup? (If possible I'd like to leave it on PIP instead of
checking out django directly from Github)
You will not find a version with the fix in the Python Package Index (used by pip), as long as a stable release which includes the change doesn't come out.
Here are some options:
Wait till a new stable version with the fix comes out.
NOT RECOMMENDED: You can install a current development version of Django from the master branch. This would solve your particular problem, but would be absolutely insane and most likely would introduce all kinds of other problems.
You can get the 1.6.1 stable version from git, and then try to manually cherry-pick the change from the master branch. It's quite likely this won't work or at least require some additional manual changes, since the change was not originally intended for the 1.6.x branch.
If you get the team to backport the change to the 1.6.x branch you can run Django from this branch. I wouldn't do this in production, but it is much safer than running from master. This of course would be a temporary solution, before a new minor 1.6.x version comes out.
If you get the team to backport the change to the 1.6.x branch, you can get the 1.6.1 stable version from git, and then manually cherry-pick the change from the 1.6.x branch.