Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
django-admin startproject not working
I have created django file using django-admin startproject command and the file was saved in C drive, but I can't find that file in C drive. So I again created django file with same name and it gives error : CommandError: 'C:\WINDOWS\system32\website' already exists Can someone help me to solve this problem. Thanks in advance!!! -
Django ORM filter multiple values in multiple columns
I have SQL ... WHERE (id, case, date) IN (SELECT ...) My question is How can I do this in .filter() in Django ORM. -
KeyError: 'manager' in django get_initial
I working on FormView, and I need to set initial from another object, an example in my case we use Question model to set an initial for QuestionSuggestedEditsForm. But we got an error when updating the initial dict. 1. forms.py class QuestionSuggestedEditsForm(forms.ModelForm): class Meta: model = QuestionSuggestedEdits fields = ['title', 'description', 'tags'] 2. views.py class QuestionSuggestedEditsCreate(LoginRequiredMixin, RevisionMixin, FormView): template_name = 'app_faq/question_suggested_edits_create.html' form_class = QuestionSuggestedEditsForm model = QuestionSuggestedEdits def get_object(self): return get_object_or_404(Question, pk=self.kwargs['pk']) def form_valid(self, form): initial = form.save(commit=False) initial.question = self.get_object() initial.editor = self.request.user initial.save() form.save_m2m() messages.success(self.request, _('Suggeste edits Question successfully created!')) return redirect(reverse('question_redirect', kwargs={'pk': initial.pk})) def get_initial(self): initial = super(QuestionSuggestedEditsCreate, self).get_initial() for field, _cls in self.form_class.base_fields.items(): value = getattr(self.get_object(), field) # got a value #initial.update({field: 'no error'}) initial.update({field: value}) # traceback goes here.. return initial def get_context_data(self, **kwargs): context = super(QuestionSuggestedEditsCreate, self).get_context_data(**kwargs) context['question'] = self.get_object() return context And we got a traceback KeyError: 'manager'; File "/home/foobar/ENV/env-django-faq/lib/python3.5/site-packages/django/forms/boundfield.py", line 257, in build_widget_attrs if widget.use_required_attribute(self.initial) and self.field.required and self.form.use_required_attribute: File "/home/foobar/ENV/env-django-faq/lib/python3.5/site-packages/django/utils/functional.py", line 35, in __get__ res = instance.__dict__[self.name] = self.func(instance) File "/home/foobar/ENV/env-django-faq/lib/python3.5/site-packages/django/forms/boundfield.py", line 245, in initial data = self.form.get_initial_for_field(self.field, self.name) File "/home/foobar/ENV/env-django-faq/lib/python3.5/site-packages/django/forms/forms.py", line 506, in get_initial_for_field value = value() File "/home/foobar/ENV/env-django-faq/lib/python3.5/site-packages/django/db/models/fields/related_descriptors.py", line 842, in __call__ manager = getattr(self.model, kwargs.pop('manager')) KeyError: 'manager' -
Allow permission for get method for all users and allow post method for super user only in django rest api
class CategoryViewSet(viewsets.ModelViewSet): """ViewSet for the Category class""" queryset = models.Category.objects.all() serializer_class = serializers.CategorySerializer permission_classes = [permissions.IsAuthenticated] How do I allow get method for all user and post method for superusers only. -
How do I start the service automatically when Ubuntu starts?
I'm using Ubuntu 16 and I want to start the service. The service should start automatically when the system starts. The service starts the django server. [Unit] Description=service [Install] WantedBy=multi-user.target [Service] ExecStart=/usr/bin/python /home/ubuntu/wiki/Backend/manage.py python runserver 0.0.0.0:8000 Type=simple In the console error: ● wiki.service - service Loaded: loaded (/etc/systemd/system/wiki.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Fri 2017-09-22 11:10:44 UTC; 3min 36s ago Main PID: 1144 (code=exited, status=1/FAILURE) systemd[1]:Started service. python[1144]:Traceback (most recent call last): python[1144]:File "/home/ubuntu/wiki/Backend/manage.py", line 17, in <module> python[1144]: ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment? systemd[1]: wiki.service: Main process exited, code=exited, status=1/FAILURE systemd[1]: wiki.service: Unit entered failed state. systemd[1]: wiki.service: Failed with result 'exit-code'. -
Change the labels of choices dynamically - Django
I’m building a survey where each question has 5 choices which are displayed with radio buttons. The form is a model form, which shows all the questions on one page. The initial choices are set in the models. The label should be set according to question’s question_type. Eg. if the value for that is 1 then set the labels as a, b, c, d, e or if the value is 2 then set the labels as f, g, h, i, j. My questions: How do I change the label of a choice dynamically? The value of the choice stays the same but the label needs to be set according to a value of another field. The labels itself are pre-defined so I think that those should be stored in database? models.py class QuestionAnswer(models.Model): CHOICES = [ ('1', '1'), ('2', '2'), ('3', '3'), ('4', '4'), ('5', '5'), ] questionnaire_key = models.ForeignKey(Questionnaire, null=False, blank=False) question = models.ForeignKey(Question, null=False, blank=False) answer_text = models.CharField(max_length=1, null=False, choices=CHOICES, default=None) class Question(models.Model): questionnaire = models.ForeignKey(Questionnaire) question_type = models.CharField(max_length=1) forms.py class AnswerForm(forms.ModelForm): class Meta: model = QuestionAnswer exclude = ['question_type'] widgets = { 'answer_text': RadioSelect(attrs={'required': 'True'}), 'question': HiddenInput, 'questionnaire_key': HiddenInput, } -
Django models changing
I had a model class Subject(models.Model): subject_title = models.CharField(max_length=255) subject_lesson = models.ForeignKey(Lessons, on_delete=models.PROTECT) Before i had information in the database by this fields then i delete all information from database. Then i added some fields to the table. class Subject(models.Model): subject_title = models.CharField(max_length=255) subject_text = models.CharField(max_length=600) subject_image = models.ImageField(upload_to='uimages', blank=True, null=True, default='uimages/edu-logo-1.png') subject_lesson = models.ForeignKey(Lessons, on_delete=models.PROTECT) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) After this django asking me: You are trying to add the field 'created_at' with 'auto_now_add=True' to subject without a default; the database needs something to populate existing rows . 1) Provide a one-off default now (will be set on all existing rows) 2) Quit, and let me add a default in models.py Select an option: What to enter? -
Dajngo template: group by key
I have list of objs: [{ key:test1 name: name1 }, { key:test1 name: name2 }, { key:test2 name: name3 }] Is it possible to combine values with similar keys without changing the structure? not to be displayed twice test1 in my case {% for item in list %} {{ item.key }} :{{item.name}} {% endfor %} now: test1 : name1 test1 : name2 test2 : name3 desired result: test1 : name1 _____ name2 test2 : name3 -
google oauth2 - Your credentials aren't allowed when using heroku
I am using a simple social login using google oauth2. I have deployed my app on heroku. I have successfull tested the google login on my local machine. However, when using heroku to login via google, It gives me this error, AuthForbidden at /oauth/complete/google-oauth2/ Your credentials aren't allowed I am using the same keys with the same name in heroku config vars. But still not sure why its not identifying login from heroku. -
Date time error in Python
I'm trying to learn the functions of Python but there is one thing I came across which I cannot figure out. calculated_time = '2014.03.08 11:43:12' >>> calculated_time = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") >>> print calculated_time 2017-09-22 15:59:34 Now when I run: cmpDate = datetime.strptime(calculated_time, '%Y.%m.%d %H:%M:%S') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/_strptime.py", line 332, in _strptime (data_string, format)) ValueError: time data '2017-09-22 16:35:12' does not match format'%Y.%m.%d %H:%M:%S' I can't understand why, if I directly pass this date then it is running but when I pass it after storing in a variable then I've got an error. -
Django, how to implement authorization in different ways
Tell me how to implement it so that some users (user) on login are authorized by phone, and the rest (owner, employee) by email, and all with different access rights? class UserManager(BaseUserManager): def create_user(self, phone, password=None): if not phone: raise ValueError('Please, enter the correct phone number') user = self.model(phone=phone) user.set_password(password) user.save(using=self._db) return user def create_superuser(self, phone, password): user = self.create_user(phone=phone, password=password) user.is_admin = True user.is_staff = True user.is_superuser = True user.save(using=self._db) return user class User(AbstractBaseUser, PermissionsMixin): phone_regex = RegexValidator(regex=r'^\+?1?\d{9,15}$', message="Phone number must be entered in the format: '+999999999'. Up to 15 digits allowed.") phone = models.CharField(validators=[phone_regex], blank=True, max_length=15) phone = models.IntegerField(('contact number'), unique=True, db_index=True) # email = models.EmailField(_('email address'), unique=True) is_admin = models.BooleanField('superuser', default=False) is_staff = models.BooleanField(default=False) objects = UserManager() USERNAME_FIELD = 'phone' def get_full_name(self): return str(self.phone) def get_short_name(self): return str(self.phone) def __unicode__(self): return str(self.phone) -
How to install mod_wsgi on Windows+XAMPP in 2017
Im a trying (hard) to set up environment for Django app on Windows with XAMPP. What I have: Windows 7 64bit Apache/2.4.25 (Win32) Python 3.6.1 Cygwin 2.9.0(0.318/5/3) MOD_WSGI_APACHE_ROOTDIR pointing to apache dir in XAMPP installation What I did already: Tried to install with pip install mod_wsgi but it didn't work because apxs could not be found. So I've installed httpd-devel in Cygwin. Now it rises collect2: error: ld returned 1 exit status error with massive output that I can't understand. According to this, I've downloaded WHL file, exctracted PYD file but when I want to run Apache I get syntax error on LoadModule wsgi_module modules/mod_wsgi.pyd: Cannot load modules/mod_wsgi.pyd into server: The specified module could not be found.. I've tried 3 versions of WHL. I'm new to Python/Django and WSGI and I'm already done ;-) -
Cannot add Django management commands to project on my development environment
I have an existing project with several custom management commands in an app. These commands run fine both locally and in production. When I add a new command (newtask.py) to the folder however, it cannot be found. When I run manage.py newtask, it says: Unknown command: 'newtask' If I open manage.py shell, and I try to import the file directly, like so: from app.management.commands.newtask import Command I get the following: Traceback (most recent call last): File "<console>", line 1, in <module> ImportError: No module named newtask The app in question works fine, and other commands in the same folder also work fine and can be imported. I handed this over to another developer I work with, and he can run newtask on his local machine no problem. I have checked and double checked: Installed Apps I'm in the right virtualenv File permissions are the same as existing commands The file is not open in another application I've also thought to copy existing, working code from another command into a new file. I get exactly the same issue - the new copy of a working command isn't found, cannot be imported, etc. Django just refuses to "see" it even though it's … -
Why am I getting a form error from this CheckboxSelectMultiple (M2M), but not another that's nearly identical?
I'm getting the error Select a valid choice. 1 is not one of the available choices. when I submit this form (with a change in the selection for students): class AdvisorAddForm(forms.ModelForm): class Meta: model = Advisor fields = ['LastName','FirstName','Email','students'] def __init__(self, *args, **kwargs): active_section = kwargs.pop('active_section',None) super(AdvisorAddForm, self).__init__(*args, **kwargs) self.fields['students'].widget = forms.CheckboxSelectMultiple() try: this_school = self.instance.school self.fields['students'].queryset = Student.objects.all().filter(school=this_school,sections__in=[active_section]).order_by('LastName') except: pass But this form works fine: class AssessmentAddForm(forms.ModelForm): class Meta: model = Assessment fields = ['Name','Date','section','standards'] AddToSections = forms.BooleanField(initial=False,required=False,label="Add This Assessment To All Of Your Sections") def __init__(self, *args, **kwargs): standard_list = kwargs.pop('standard_list',None) super(AssessmentAddForm, self).__init__(*args, **kwargs) self.fields['section'].widget=HiddenInput() self.fields['standards'].widget = forms.CheckboxSelectMultiple() try: active_section = self.instance.section self.fields['standards'].queryset = Standard.objects.all().filter(course__in=[active_section.course]) self.fields['standards'].initial = standard_list except: pass It looks like it's getting a pk where it expects an object, but I'm not sure why, or why the other one wouldn't have that issue, too. -
Problems running a test site
I'm new with Python > Django. I have problems running a hello world page on my test website. I'm using pythonanywhere.com to make a test site. I created the site folder and the app folder correctly using these commands: django-admin startproject website python manage.py startapp music Now to show a hello world page i opened the website urls.py and wrote these lines: from django.conf.urls import include, url from django.contrib import admin urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^music/', include('music.urls')), ] music/urls.py from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.index, name='index'), ] music/views.py from django.http import httpresponse def index(request): return httpresponse("hello world") When I visite mysite.com/music/ I see a 404 error page. Why? -
django create object from recursive model
I have problem with creating object with recursive relation. So the scenario is right after create organization, insert user to just-created organization. # models.py class Organization(models.Model): name = models.CharField(max_length=32) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) code = models.CharField(max_length=4, unique=True) photo_path = models.CharField(max_length=256, null=True) class Meta: db_table = 'organization' def __str__(self): return self.name class OrganizationLevel(models.Model): organization = models.ForeignKey( Organization, on_delete=models.CASCADE, db_index=False ) parent = models.ForeignKey( 'self', on_delete=models.CASCADE, db_index=False ) name = models.CharField(max_length=48) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) class Meta: db_table = 'organization_level' unique_together = ('name', 'organization') class OrganizationUnit(models.Model): organization_level = models.ForeignKey( OrganizationLevel, on_delete=models.CASCADE, db_index=False ) name = models.CharField(max_length=48) position = models.PointField(geography=True, null=True) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) parent = models.ForeignKey( 'self', on_delete=models.CASCADE, db_index=False ) address = models.CharField(max_length=256) class Meta: db_table = 'organization_unit' unique_together = ('name', 'organization_level') class User(models.Model): email = models.CharField(max_length=64) username = models.CharField(max_length=32) password = models.CharField(max_length=64) token = models.CharField(max_length=32, null=True) tokenexp = models.DateTimeField(null=True) photo_path = models.CharField(max_length=256) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) organization = models.ForeignKey( Organization, on_delete=models.CASCADE ) is_activated = models.BooleanField(default=False) code = models.CharField(max_length=32, null=True) name = models.CharField(max_length=64) birthdate = models.DateTimeField(null=True) sex = models.CharField(max_length=1) address = models.CharField(max_length=80) organization_unit = models.ForeignKey( OrganizationUnit, on_delete=models.CASCADE ) class Meta: db_table = 'user' So from given models, here's the flow: Create organization Create … -
Django: how to validate m2m relationships?
Let's say I have a Basket model and I want to validate that no more than 5 Items can be added to it: class Basket(models.Model): items = models.ManyToManyField('Item') def save(self, *args, **kwargs): self.full_clean() super(Basket, self).save(*args, **kwargs) def clean(self): super(Basket, self).clean() if self.items.count() > 5: raise ValidationError('This basket can\'t have so many items') But when trying to save a Basket a RuntimeError is thrown because the maximum recursion depth is exceeded. Apparently Django's intricacies simply won't allow you to validate m2m relationships when saving a model. How can I validate them then? -
Django Cookie with Login function
I'm trying to set my first cookie with Django when users are logged on my application. When user is logged, the template is well-displayed but none cookie in my application which is named : Cookie My function looks like : def Login(request): error = False if request.method == "POST": form = ConnexionForm(request.POST) if form.is_valid(): username = form.cleaned_data["username"] password = form.cleaned_data["password"] user = authenticate(username=username, password=password) if user: login(request, user) toto = GEDCookie(request) return render(request, 'Home_Homepage.html', {'toto':toto}) else: error = True else: form = ConnexionForm() return render(request, 'Authentication_Homepage.html', locals()) @csrf_exempt def GEDCookie(request): SID = Logger.login("test", "10test") response = HttpResponse("Cookie") response.set_cookie('Cookie', SID, max_age=None) return response I missed something in my script ? -
Django load data dumped from sqlite to mysql - installing fixture, content type does not exist
I've dumped data from my sqlite db using the following command: ./manage.py dumpdata --exclude=contenttypes --exclude=auth.Permission --natural-foreign --natural-primary > initial_data.json however when trying to load the data into my new mysql DB I get the below errors django.core.serializers.base.DeserializationError : Problem installing fixture '/itapp/itapp/initial_data.json': ContentType matching query does not exist.: (auth.group:pk=None) field_value was '['add_circuitfiles', 'networks', 'circuitfiles']' I think this is something to do with permission groups? I'm not sure how to fix this, do I need to edit the JSON file and remove something? Thanks -
Failed to load resource: the server responded with a status of 404 (Not Found) Am I wrong to write directory?
I got an error by using Google validation like Folder structure is testapp (parent app) chosen.jquery.min.js & chosen.min.css & chosen-sprite.png -app (child app) -templates (folder) -menu.js / index.html I wrote in index.html <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <script type="text/javascript" src="chosen.jquery.min.js"></script> <link href="chosen.min.css" rel="stylesheet"> </head> <body> <select data-placeholder="Choose" class="chzn-select" style="width:350px;"> <option value="0">---</option> <option value="1" selected>A</option> <option value="2">B</option> <option value="3">C</option> <option value="3">D</option> </select> <select name="type" id="type1"> <option value="1">a-1</option> <option value="2">a-2</option> <option value="3">a-3</option> <option value="4">a-4</option> </select> <select name="type" id="type2"> <option value="5">b-1</option> <option value="6">b-2</option> <option value="7">b-3</option> <option value="8">b-4</option> <option value="9">b-5</option> </select> <select name="type" id="type3"> <option value="10">c-1</option> <option value="11">c-2</option> </select> <select name="type" id="type4"> <option value="10">d-1</option> <option value="11">d-2</option> <option value="11">d-3</option> </select> </body> <script type="text/javascript"> $(".chzn-select").chosen(); $(".chzn-select-deselect").chosen({allow_single_deselect:true}); </script> </html> What is wrong in my code?Am I wrong to write directory?By using Network of Google validation, I found chosen.jquery.min.js was not load.How can I fix this? -
Django Sum Annotation with Foreign key
I am working on a project and noticed that the Django Sum() annotation is not working properly when you use it to make a sum of a field with a foreign key. For example when you have visits to a website on which someone can place an order. The Order model has a link to the Visitmodel because you can place multiple orders in one visit. However, orders that are not coming from the website don't have a website visit. For these orders, the visit will be NULL. When I do the following, the calculation is not correct (the value is far too high). visits = visits.annotate(order_total = Sum('order__total')) When I change Sumto Avg, the calculation is done correctly. Is there a logical explanation for this? -
Why does it take more time to reach view after crossing middleware in Django?
These are following middleware in my project<br> MIDDLEWARE_CLASSES = [ <br> 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'simple_history.middleware.HistoryRequestMiddleware', 'apps.quiz.totaltimemid.TimeCalculateMiddleware', ] ------------- My custom middleware to measure time for reaching process_view of last middleware to my target view(class QuizFetchView(APIView)): class TimeCalculateMiddleware(object): def process_view(self, request, callback, callback_args, callback_kwargs): self.req_start_time = time.time() def process_response(self,request, response): try : response['vreach_time'] = float(response['tt_start']) - self.req_start_time return response except : return response .................................................. class QuizFetchView(APIView): permission_classes = [IsAuthenticated, IsAuthenticatedForRunningQuiz] def get(self, request: Request, key: str) -> Response: tt_start = time.time() .............. .............. ............ Response['tt_start'] = tt_start return Response ########################### For Login request middleware to view take very few milliseconds but subsequent request other than login take 25-35ms to reach view. Please help me, Thank you -
'str' object has no attribute 'client' - Synapse - DJango
I am working within a django project, and I am trying to send a request to the Synapse api. I am trying to link an account and i was wondering if this error has to do with the request call to synapse or something to do within django itself. If so, is there a way for me to fix it. Here is my code: def authorizeLoginSynapse(request, form): currentUser = loggedInUser(request) currentProfile = Profile.objects.get(user = currentUser) user_id = currentProfile.synapse_id synapseUser = retreiveUserSynapse(request) # cd = form.cleaned_data # bank_code = cd['bank_code'] # bank_id = cd['bank_id'] # bank_pw = cd['bank_password'] bank_id = 'synapse_good' bank_pw = 'test1234' bank_code = 'fake' print(bank_code) print(bank_id) print(bank_pw) bank_type = 'ACH-US' args = { 'bank_name':bank_code, 'username':bank_id, 'password':bank_pw, } print(args) linked_account = AchUsNode.create_via_bank_login(user_id, **args) print(linked_account) linked_account.mfa_verified Here is the error: AttributeError at /login_synapse/ 'str' object has no attribute 'client' Request Method: POST Request URL: http://127.0.0.1:8000/login_synapse/ Django Version: 1.11.5 Exception Type: AttributeError Exception Value: 'str' object has no attribute 'client' Exception Location: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/synapse_pay_rest/models/nodes/ach_us_node.py in create_via_bank_login, line 39 here is the terminal with the printing and tracebacK: fake synapse_good test1234 {'bank_name': 'fake', 'username': 'synapse_good', 'password': 'test1234'} Internal Server Error: /login_synapse/ Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/core/handlers/exception.py", line 41, in inner response … -
Django CORS fails with post request from mobile app
I am using Angular 4 / Ionic 3 for the frontend/mobile app. I am using Django 1.11 for the backend. When i try sending request from the browser as: headers.append('Content-Type', 'application/json'); headers.append('Access-Control-Allow-Origin', '*'); this.http.post('http://0.0.0.0:8000/en/accounts/user/', {} , {headers:headers}) In my Django app i've used django-cors-headers and set: - CORS_ORIGIN_ALLOW_ALL = True - CORS_ALLOW_CREDENTIALS = True From the browser i get the expected response , but when testing from mobile app the CORS request doesn't seem to pass ( returns Response with status: 0 for URL: null ) Any suggestions on this ? -
AttributeError: 'NoneType' object has no attribute 'attname' (Django)
I have a fairly complex model for which the first call to MyModel.objects.create(**kwargs) fails with AttributeError: 'NoneType' object has no attribute 'attname' The stack trace dives down like this (in Django 1.11) django/db/models/manager.py:85: in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) django/db/models/query.py:394: in create obj.save(force_insert=True, using=self.db) django/db/models/base.py:807: in save force_update=force_update, update_fields=update_fields) django/db/models/base.py:837: in save_base updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields) django/db/models/base.py:889: in _save_table pk_val = self._get_pk_val(meta) django/db/models/base.py:644: in _get_pk_val return getattr(self, meta.pk.attname) django/db/models/query_utils.py:114: in __get__ val = self._check_parent_chain(instance, self.field_name) django/db/models/query_utils.py:131: in __check_parent_chain return getattr(instance, link_field.attname) The model definition looks alright to me. I have checked all the parameters of the create call are just what I want them to be. I'm not keen on stripping down the model to find the problem, because the model is so complex. (All my other models, many of them similar, appear to work fine.) So what might cause this strange message?