I can run the server now but the Search does not work. I realize it will be 
difficult for me to figure things out before additional documentation is 
available (like "Initial Configuration"). But maybe this error rings a 
bell? 

(ENV) C:\Projects\my_project>python manage.py runserver 0.0.0.0:8000
Performing system checks...
System check identified no issues (0 silenced).
May 04, 2017 - 08:30:22
Django version 1.9.2, using settings 'my_project.settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CTRL-BREAK.
[04/May/2017 08:30:41] "GET / HTTP/1.1" 200 20099
[04/May/2017 08:31:11] "GET /search HTTP/1.1" 200 73116
[04/May/2017 08:31:12] "GET /search/time_wheel_config HTTP/1.1" 404 38
[04/May/2017 08:31:12] "GET /search/resources?no_filters=true&page=1 
HTTP/1.1" 4
04 48
[04/May/2017 08:31:12] "GET /widgets/map HTTP/1.1" 200 31596

Thank you!
Viktor


On Tuesday, May 2, 2017 at 5:00:15 PM UTC-7, Adam Cox wrote:

> Well, nice work on all of the troubleshooting. The previous screenshot I 
> posted was from a separate virtual environment  that was created from a 
> separate 2.7.13 installation of Python, though I do have 2.7.6 installed 
> globally. You can see how the installation was created with this script 
> https://gist.github.com/mradamcox/e66f5008a72c1896003ecc785cb643fe. The 
> idea was to make an installation completely agnostic of whatever python 
> already exists on a windows operating system.
>
> Anyway, again, thanks for figuring this out. For now, I'll change the 
> documentation to recommend that 2.7.12 be used in favor of 2.7.13.
>
> Adam
>
> On Tue, May 2, 2017 at 6:49 PM, Viktor_Getty <[email protected] 
> <javascript:>> wrote:
>
>> Hi Adam,
>>
>> I was able to confirm Python 2.7.13 bug of Unicode vs. String. I used a 
>> new VM, completely fresh, with a different OS (Windows 2012 Server instead 
>> of Windows 2008 Server and got exactly the same problem:
>>
>>   
>>   ...  from django.contrib.gis.gdal.libgdal import GDAL_VERSION, lgdal
>>   File 
>> "C:\Projects\ENV\lib\site-packages\django\contrib\gis\gdal\libgdal.py", l
>> ine 48, in <module>
>>     lgdal = CDLL(lib_path)
>>   File "c:\python27\Lib\ctypes\__init__.py", line 362, in __init__
>>     self._handle = _dlopen(self._name, mode)
>> TypeError: LoadLibrary() argument 1 must be string, not Unicode
>>
>> Then I modified the file 
>> "C:\Projects\ENV\Lib\site-packages\django\contrib\gis\gdal\libgdal.py" in 2 
>> places, where it was failing, like this:
>>
>> lgdal = CDLL(lib_path.encode('ascii', 'ignore')) 
>>
>> Basically converted 'lgdal' to string. After that my installation 
>> proceeded.
>>
>> The question remains why did you not have this issue? My hypothesis is 
>> that maybe you were not running 2.7.13 when creating DB? I noticed in a 
>> previous post you had 2.7.6. So either you have two installations and in 
>> this case you could check if the correct version is being invoked. Or if 
>> you uninstalled 2.7.6 maybe it was not cleaned all the way? One person in 
>> that discussion that I posted complained that after uninstalling 2.7.13 and 
>> installing 2.7.12 he still had problems, which he attribute to this effect. 
>> But this is of course my guessing, who know what actually happened...
>>
>> This is of course not a good workaround, but after v. 2.7.14 is out this 
>> should be fixed.
>>
>> After these fixes the DB was created:
>>
>> (ENV) C:\Projects\my_project>python manage.py packages -o setup_db
>> operation: setup_db
>> package: arches
>>  pg_terminate_backend
>> ----------------------
>> (0 rows)
>>
>> DROP DATABASE
>> CREATE DATABASE
>> Operations to perform:
>>   Apply all migrations: sessions, admin, guardian, auth, models, 
>> contenttypes
>> Running migrations:
>>   Rendering model states... DONE
>>   Applying contenttypes.0001_initial... OK
>>   Applying auth.0001_initial... OK
>>   Applying admin.0001_initial... OK
>>   Applying admin.0002_logentry_remove_auto_add... OK
>>   Applying contenttypes.0002_remove_content_type_name... OK
>>   Applying auth.0002_alter_permission_name_max_length... OK
>>   Applying auth.0003_alter_user_email_max_length... OK
>>   Applying auth.0004_alter_user_username_opts... OK
>>   Applying auth.0005_alter_user_last_login_null... OK
>>   Applying auth.0006_require_contenttypes_0002... OK
>>   Applying auth.0007_alter_validators_add_error_messages... OK
>>   Applying guardian.0001_initial... OK
>>   Applying models.0001_initial... OK
>>   Applying sessions.0001_initial... OK
>> deleting index : strings
>> deleting index : resource
>> deleting index : resource_relations
>> creating index : strings
>> creating index : resource_relations
>> (ENV) C:\Projects\my_project>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Tuesday, May 2, 2017 at 12:09:45 PM UTC-7, Adam Cox wrote:
>>
>>> That's not to say there isn't something slightly different between our 
>>> environments, so I'll be interested to hear what you find.
>>>
>>> On Tue, May 2, 2017 at 2:08 PM, Adam Cox <[email protected]> wrote:
>>>
>>>> Ok, I have not had an issue with 2.7.13, so I'd recommend first making 
>>>> sure that you have the correct GDAL version, i.e. used the correct osgeo 
>>>> installer for your OS.
>>>>
>>>> [image: Inline image 2]
>>>>
>>>> On Tue, May 2, 2017 at 1:56 PM, Viktor_Getty <[email protected]> wrote:
>>>>
>>>>> Yes, this is what I get
>>>>>
>>>>> C:\Projects>python
>>>>> Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC 
>>>>> v.1500 64 bit (
>>>>> AMD64)] on win32
>>>>> Type "help", "copyright", "credits" or "license" for more information.
>>>>> >>>
>>>>>
>>>>> Based on this discussion 
>>>>> https://github.com/rg3/youtube-dl/issues/11540 it looks this is 
>>>>> Python 2.7.13 issue.
>>>>>
>>>>> Here's a summary:
>>>>> Version_ctypes.dlopen()_ctypes.LoadLibrary()
>>>>> 2.7.12 S & U S & U
>>>>> 2.7.13 S & U S
>>>>> 3.x S & U U
>>>>>
>>>>> Here S and U indicate bytes and unicode objects, respectively.
>>>>>
>>>>>
>>>>> Based on the same discussion, the issue is likely to be resolved in 
>>>>> 2.7.14 sometime in the middle of 2017. Meanwhile I will downgrade to 
>>>>> 2.7.12 
>>>>> and see what happens.
>>>>>
>>>>> Thank you!
>>>>> Viktor
>>>>>
>>>>> On Tuesday, May 2, 2017 at 10:36:31 AM UTC-7, Adam Cox wrote:
>>>>>
>>>>>> Hm, you should be able to just type python and when the interpreter 
>>>>>> opens it should give you the info, for example
>>>>>>
>>>>>> [image: Inline image 3]
>>>>>>
>>>>>> On Tue, May 2, 2017 at 11:43 AM, Adam Cox <[email protected]> wrote:
>>>>>>
>>>>>>> This error is generally when you have the wrong 32-bit or 64-bit 
>>>>>>> version of GDAL for your Python installation. Can you can confirm that 
>>>>>>> all 
>>>>>>> of these things are in sync? i.e. you have 64-bit python, and 64-bit 
>>>>>>> GDAL. 
>>>>>>> These should also match your operating system architecture.
>>>>>>>
>>>>>>> On Tue, May 2, 2017 at 11:38 AM, Viktor_Getty <[email protected]> 
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Thank you, Adam. When running #7 - Set up your Arches Database, I 
>>>>>>>> encountered this error. Please see if you may know what the reason is.
>>>>>>>>
>>>>>>>> Thanks!
>>>>>>>> Viktor
>>>>>>>>
>>>>>>>> *.........*
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> *    from django.contrib.gis.gdal.driver import Driver  # NOQA  
>>>>>>>> File 
>>>>>>>> "C:\Projects\ENV\lib\site-packages\django\contrib\gis\gdal\driver.py", 
>>>>>>>> line 5, in <module>    from django.contrib.gis.gdal.prototypes import 
>>>>>>>> ds as 
>>>>>>>> vcapi, raster as rcapi  File 
>>>>>>>> "C:\Projects\ENV\lib\site-packages\django\contrib\gis\gdal\prototypes\ds.py",
>>>>>>>>  
>>>>>>>> line 9, in <module>    from django.contrib.gis.gdal.libgdal import 
>>>>>>>> GDAL_VERSION, lgdal  File 
>>>>>>>> "C:\Projects\ENV\lib\site-packages\django\contrib\gis\gdal\libgdal.py",
>>>>>>>>  
>>>>>>>> line 48, in <module>    lgdal = CDLL(lib_path)  File 
>>>>>>>> "c:\python27\Lib\ctypes\__init__.py", line 362, in __init__    
>>>>>>>> self._handle 
>>>>>>>> = _dlopen(self._name, mode)TypeError: LoadLibrary() argument 1 must be 
>>>>>>>> string, not unicode*
>>>>>>>> *(ENV) C:\Projects\my_project>*
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Monday, May 1, 2017 at 4:22:00 PM UTC-7, Adam Cox wrote:
>>>>>>>>
>>>>>>>>> Ah, that step is actually unnecessary, given that the arches-project 
>>>>>>>>> create command worked (I think it got dragged along from the 
>>>>>>>>> developer installation steps). Just skip to the setup database step, 
>>>>>>>>> and 
>>>>>>>>> you should be good to go.
>>>>>>>>>
>>>>>>>>> On Mon, May 1, 2017 at 6:09 PM, Viktor_Getty <[email protected]> 
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> Thank you! I just modified the file 'arches-project' as in your 
>>>>>>>>>> commit, and #5. 'Create my_project' ran with no error. But now, when 
>>>>>>>>>> I 
>>>>>>>>>> tried the next one
>>>>>>>>>>
>>>>>>>>>> 6. Run the bower installation
>>>>>>>>>>
>>>>>>>>>> Enter your new project directory (cd my_project) and run:
>>>>>>>>>>
>>>>>>>>>> bower install
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>  I got this message:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> (ENV) C:\Projects\my_project>bower install
>>>>>>>>>> bower ENOENT        No bower.json present
>>>>>>>>>>
>>>>>>>>>> Thanks again!
>>>>>>>>>> Viktor
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Monday, May 1, 2017 at 3:44:05 PM UTC-7, Adam Cox wrote:
>>>>>>>>>>
>>>>>>>>>> Hi Viktor. Yes, that command must be run with the virtual 
>>>>>>>>>>> environment activated. I should make a note that all arches CLI 
>>>>>>>>>>> commands 
>>>>>>>>>>> should be run with the virtual environment activated.
>>>>>>>>>>>
>>>>>>>>>>> As for the subprocess error, that was fixed a little while ago 
>>>>>>>>>>> with this commit: 
>>>>>>>>>>> https://github.com/archesproject/arches/commit/2a71b729d03ac6958241c31f202b39f65b19707a,
>>>>>>>>>>>  
>>>>>>>>>>> however it was after the latest publication of Arches to pip.
>>>>>>>>>>>
>>>>>>>>>>> For now, you should just enter your new project folder, and then 
>>>>>>>>>>> run bower install to manually accomplish what that the 
>>>>>>>>>>> error-throwing command is trying to do. It is the last step in the 
>>>>>>>>>>> project 
>>>>>>>>>>> creation command, so you should be good to go after that.
>>>>>>>>>>>
>>>>>>>>>>> Adam
>>>>>>>>>>>
>>>>>>>>>>> On Mon, May 1, 2017 at 5:19 PM, Viktor_Getty <[email protected]> 
>>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Adam, thank you much for answering my 'Mapnik' question. I 
>>>>>>>>>>>> started a new thread since it is no longer a 'Mapnik' issue.
>>>>>>>>>>>>
>>>>>>>>>>>> I was able to install dependences and did steps 1 - 4 in 
>>>>>>>>>>>> https://arches4.readthedocs.io/en/latest/installation/. But I 
>>>>>>>>>>>> stumbled on #5 (Create a new Arches project). According to the 
>>>>>>>>>>>> document, 
>>>>>>>>>>>> the command for Windows is:
>>>>>>>>>>>>
>>>>>>>>>>>> python C:\Projects\ENV\Scripts\arches-project create my_project
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> But when I run it as it is, I get this error:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> C:\Projects>python C:\Projects\ENV\Scripts\arches-project create 
>>>>>>>>>>>> my_project
>>>>>>>>>>>> Traceback (most recent call last):
>>>>>>>>>>>>   File "C:\Projects\ENV\Scripts\arches-project", line 2, in 
>>>>>>>>>>>> <module>
>>>>>>>>>>>>     import arches
>>>>>>>>>>>> ImportError: No module named arches
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> I suspect this command has to be run from the virtual 
>>>>>>>>>>>> environment *((ENV) C:\Projects>python 
>>>>>>>>>>>> c:\projects\env\scripts\arches-project create my_project*). 
>>>>>>>>>>>> But when I do, I get this error message:
>>>>>>>>>>>>
>>>>>>>>>>>> Traceback (most recent call last):
>>>>>>>>>>>>   File "c:\projects\env\scripts\arches-project", line 137, in 
>>>>>>>>>>>> <module>
>>>>>>>>>>>>     main()
>>>>>>>>>>>>   File "c:\projects\env\scripts\arches-project", line 131, in 
>>>>>>>>>>>> main
>>>>>>>>>>>>     COMMANDS[args.command](args)
>>>>>>>>>>>>   File "c:\projects\env\scripts\arches-project", line 58, in 
>>>>>>>>>>>> command_create_app
>>>>>>>>>>>>     subprocess.call(bower_install.split(), shell=False)
>>>>>>>>>>>>   File "c:\python27\Lib\subprocess.py", line 168, in call
>>>>>>>>>>>>     return Popen(*popenargs, **kwargs).wait()
>>>>>>>>>>>>   File "c:\python27\Lib\subprocess.py", line 390, in __init__
>>>>>>>>>>>>     errread, errwrite)
>>>>>>>>>>>>   File "c:\python27\Lib\subprocess.py", line 640, in 
>>>>>>>>>>>> _execute_child
>>>>>>>>>>>>     startupinfo)
>>>>>>>>>>>> WindowsError: [Error 2] The system cannot find the file 
>>>>>>>>>>>> specified
>>>>>>>>>>>> (ENV) C:\Projects>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Thank you, 
>>>>>>>>>>>> Viktor
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> -- 
>>>>>>>>>>>> -- To post, send email to [email protected]. To 
>>>>>>>>>>>> unsubscribe, send email to [email protected]. 
>>>>>>>>>>>> For more information, visit 
>>>>>>>>>>>> https://groups.google.com/d/forum/archesproject?hl=en
>>>>>>>>>>>> --- 
>>>>>>>>>>>> You received this message because you are subscribed to the 
>>>>>>>>>>>> Google Groups "Arches Project" group.
>>>>>>>>>>>> To unsubscribe from this group and stop receiving emails from 
>>>>>>>>>>>> it, send an email to [email protected].
>>>>>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> -- 
>>>>>>>>>> -- To post, send email to [email protected]. To 
>>>>>>>>>> unsubscribe, send email to [email protected]. For 
>>>>>>>>>> more information, visit 
>>>>>>>>>> https://groups.google.com/d/forum/archesproject?hl=en
>>>>>>>>>> --- 
>>>>>>>>>> You received this message because you are subscribed to the 
>>>>>>>>>> Google Groups "Arches Project" group.
>>>>>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>>>>>> send an email to [email protected].
>>>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> -- 
>>>>>>>> -- To post, send email to [email protected]. To 
>>>>>>>> unsubscribe, send email to [email protected]. For 
>>>>>>>> more information, visit 
>>>>>>>> https://groups.google.com/d/forum/archesproject?hl=en
>>>>>>>> --- 
>>>>>>>> You received this message because you are subscribed to the Google 
>>>>>>>> Groups "Arches Project" group.
>>>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>>>> send an email to [email protected].
>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> -- 
>>>>> -- To post, send email to [email protected]. To unsubscribe, 
>>>>> send email to [email protected]. For more information, 
>>>>> visit https://groups.google.com/d/forum/archesproject?hl=en
>>>>> --- 
>>>>> You received this message because you are subscribed to the Google 
>>>>> Groups "Arches Project" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>>> an email to [email protected].
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>>
>>> -- 
>> -- To post, send email to [email protected] <javascript:>. To 
>> unsubscribe, send email to [email protected] <javascript:>. 
>> For more information, visit 
>> https://groups.google.com/d/forum/archesproject?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Arches Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
-- To post, send email to [email protected]. To unsubscribe, send 
email to [email protected]. For more information, 
visit https://groups.google.com/d/forum/archesproject?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Arches Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to